confluentinc / confluentinc/kafka-tutorials

Transform survey responses

Open
#1,190 0 comments 0 reactions 1 assignee Assigned to @danicafine View on GitHub
recipe use case
Dominant language
Java
Stars
39
Forks
91
PR merge metrics
No merged PRs in 30d

Description

Consider a situation where you have raw survey data, which you can now analyze.

Sample query to draw from and adapt to ksql, and then add a join to join the survey responses onto CRM data to see if participants map to any existing accounts. (this code sample is not ksql-ready, it needs to be adapted)

```
SELECT
programming_answers.Language AS programming_answers_language,
project_answers.Title AS project_answers_title,
AVG((case when programming_answers.Level='None' then 0
when programming_answers.Level='beginner' then 1
when programming_answers.Level='competent' then 2
when programming_answers.Level='proficient' then 3
when programming_answers.Level='expert' then 4
else null end) ) AS programming_answers_average_level_value
FROM `my-project.DesignPattern.A000111_ProjectAnswers` AS project_answers
INNER JOIN `my-project.A000111_ProgrammingAnswers` AS programming_answers
ON programming_answers.RESPONSE_ID = project_answers.RESPONSE_ID
GROUP BY 1,2
ORDER BY 3 DESC
```

Inspiration: https://codelabs.developers.google.com/codelabs/survey-data-warehouse#6

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.