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: Create an analytics_summary database view for analytics #2450

Merged
merged 4 commits into from
Nov 22, 2023

Conversation

DafyddLlyr
Copy link
Contributor

@DafyddLlyr DafyddLlyr commented Nov 18, 2023

What does this PR do?

Copy link

github-actions bot commented Nov 18, 2023

🤖 Hasura Change Summary compared a subset of table metadata including permissions:

Tracked Tables (1)

t.slug as team_slug,
a.type as analytics_type,
a.created_at as analytics_created_at,
a.user_agent as user_agent,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm hoping we can keep this as a JSONB column with the changes in #2451

If not, I can just pull out the key bits of data here like browser, platform etc

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with initially keeping as JSONB!

nit: a.user_agent as user_agent is redundant / unnecessary and adds a bit of noise? only need as if actually renaming, table reference won't be visible in final view (applies to a number of columns below too)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch 👍

Copy link

github-actions bot commented Nov 18, 2023

Removed vultr server and associated DNS entries

@DafyddLlyr DafyddLlyr changed the title feat: First pass at analytics view feat: Create an analytics_summary database view for analytics Nov 18, 2023
@DafyddLlyr DafyddLlyr marked this pull request as ready for review November 18, 2023 11:11
@DafyddLlyr DafyddLlyr requested a review from a team November 18, 2023 11:11
Copy link
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but I'll let Mike do final approval of this one as he's most familiar with pain points around current joins 👍

t.slug as team_slug,
a.type as analytics_type,
a.created_at as analytics_created_at,
a.user_agent as user_agent,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with initially keeping as JSONB!

nit: a.user_agent as user_agent is redundant / unnecessary and adds a bit of noise? only need as if actually renaming, table reference won't be visible in final view (applies to a number of columns below too)

Copy link
Contributor

@Mike-Heneghan Mike-Heneghan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great 🥳

I really think this will make building questions via the Metabase GUI way easier and make the extra features associated with that available!

One thing I suppose we should maybe keep in mind going forward is that any new columns like allowlist which are created would benefit from being added to this view.

@jessicamcinchak
Copy link
Member

jessicamcinchak commented Nov 22, 2023

Thanks for final review, Mike - I'll merge this ✔️

Are you happy to take care of making visible in Metabase and updating SQL so we can eventually "hide" raw tables if no longer necessary? (as you go, doesn't need to be an immediate swap!)

@jessicamcinchak jessicamcinchak merged commit e0630fd into main Nov 22, 2023
12 checks passed
@jessicamcinchak jessicamcinchak deleted the dp/analytics-view branch November 22, 2023 14:18
jessicamcinchak added a commit that referenced this pull request Nov 22, 2023
@Mike-Heneghan
Copy link
Contributor

Thanks for final review, Mike - I'll merge this ✔️

Are you happy to take care of making visible in Metabase and updating SQL so we can eventually "hide" raw tables if no longer necessary? (as you go, doesn't need to be an immediate swap!)

Once we've side stepped the name change issue I'd be happy to pick this up 👍

jessicamcinchak added a commit that referenced this pull request Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants