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

feat(#558-1): exclure les feedbacks non répondus du calcul des givers et receiveurs #712

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
WITH feedbacks AS (
SELECT
DATE_TRUNC(TIMESTAMP_MILLIS(CAST(JSON_EXTRACT_SCALAR(DATA, "$.createdAt") AS INT)), DAY) AS day,
JSON_EXTRACT_SCALAR(DATA, "$.giverEmail") AS giverEmail,
JSON_EXTRACT_SCALAR(DATA, "$.receiverEmail") AS receiverEmail

FROM firestore_export.feedback_raw_latest
)
SELECT DISTINCT *
FROM feedbacks
WHERE JSON_EXTRACT_SCALAR(DATA, "$.status") = "done"
2 changes: 2 additions & 0 deletions usage-analytics/create-analytics/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,6 @@ def create_analytics_tables(*_):
execute_query("externe_feedbacks_per_month.sql", "feedzback_usage", "externe_feedbacks_per_month")
# This query answer the question "how many feedbacks are shared with managers each month"
execute_query("shared_feedbacks_per_month.sql", "feedzback_usage", "shared_feedbacks_per_month")
# This query answers the question: "What is the number of givers and the number of receivers"
execute_query("feedbackers_giver_receiver_repartition.sql", "feedzback_usage", "feedbackers_giver_receiver_repartition")
return 'OK'