-
Notifications
You must be signed in to change notification settings - Fork 2
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: feedback analytics and previously submitted answers #3948
Conversation
Removed vultr server and associated DNS entries |
((ls.allow_list_answers -> 'application.information.harmful'::text))::text AS pre_app_harmful_info, | ||
((ls.allow_list_answers -> 'application.information.sensitive'::text))::text AS pre_app_sensitive_info, | ||
(((ls.allow_list_answers -> 'application.type'::text) -> 0))::text AS application_type, | ||
((ls.allow_list_answers -> '_feedback'::text))::text AS feedback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: since _feedback
is an obejct itself, should the views actually drill down one level further to, for example, expose feedback score as its own column? Otherwise I think we'll hit up against usual "Metabase can't process JSONB types" error !
Score seems like obvious first priority for analytics, I'd leave it up to you if we want to expose other _feedback
fields too now/up front or wait to expose them on request later if it comes up!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have attempted to implement this, but wasn't really very sure of it!
Also struggled to test it - eventually realised it was only populating the analytics tables when I finished a flow - is that right? 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Full comment below - let's try something like ((ls.allow_list_answers -> '_feedback' -> 'feedbackScore'::int))::int AS feedback_score
to extract the view-level column data !
@@ -20,6 +21,8 @@ const ALLOW_LIST = [ | |||
"application.information.sensitive", | |||
"application.type", | |||
"drawBoundary.action", | |||
"_feedback", | |||
"_feedback.feedbackScore", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for confusion here! Here's what I'd expect:
- only
"_feedback"
should be included in this list. Dot-separated variables only work when it's the "whole" property name and doesn't require destructuring a passport value, which"_feedback.feedbackScore"
would - This means that
feedback
column in the raw analytics table will look exactly like you've posted above - a jsonb object ! - then in the SQL to generate the view you should be able to do something like
((ls.allow_list_answers -> '_feedback' -> 'feedbackScore'::int))::int AS feedback_score
so that what we're exposing to Metabase is the feedback score as an integer (Metabase can't process jsonb! And free-textuserComments
are nice to track in raw table but aren't very chart-able)
Does this make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Jess, the int
version you put above (and variations I have tried) caused syntax errors "message": "invalid input syntax for type integer: \"feedbackScore\"",
- I assume the reason it shouldn't be text is because Metabase can make nice charts with numbers and can't convert from string numbers to actual numbers?
Have added a column for userComment in the table, and I assume that the feedback column (displaying jsonb) is completely redundant then, given that we now have separate columns for feedback_score
and user_comment
. Figuring out a way to drop that column from the view if so!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks great! Would suggest logging into Vultr & destroying instance & re-running latest failed CI to see if you can clear up errors? Looks like docker-related errors due to editing migrations I'd guess?
((ls.allow_list_answers -> 'service.type'::text))::text AS pre_app_service_type, | ||
((ls.allow_list_answers -> 'application.information.harmful'::text))::text AS pre_app_harmful_info, | ||
((ls.allow_list_answers -> 'application.information.sensitive'::text))::text AS pre_app_sensitive_info, | ||
((ls.allow_list_answers -> '_feedback') ->> 'feedbackScore'::text)::int AS feedback_score |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tricky casting, but works exactly as expected 💯
What's in this PR?
_feedback
to allow_listssubmission_services_summary
andanalytics_summary
views to includefeedback_score
.Verified that feedback_score is an
int
and displaying inanalytics_summary
✅🎟️ Trello ticket: https://trello.com/c/jEOLoubW/3034-can-we-introduce-in-house-end-of-service-feedback