Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform survey responses #1190

Open
ybyzek opened this issue Mar 21, 2022 · 0 comments
Open

Transform survey responses #1190

ybyzek opened this issue Mar 21, 2022 · 0 comments
Assignees
Labels
recipe use case A tutorial with an extended business use case

Comments

@ybyzek
Copy link
Contributor

ybyzek commented Mar 21, 2022

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

@ybyzek ybyzek added recipe use case A tutorial with an extended business use case labels Mar 21, 2022
@daveklein daveklein self-assigned this Mar 23, 2022
@danicafine danicafine assigned danicafine and unassigned daveklein Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
recipe use case A tutorial with an extended business use case
Projects
None yet
Development

No branches or pull requests

3 participants