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

Model the Snowflake access history #17

Open
ian-whitestone opened this issue Oct 27, 2022 · 1 comment
Open

Model the Snowflake access history #17

ian-whitestone opened this issue Oct 27, 2022 · 1 comment

Comments

@ian-whitestone
Copy link
Contributor

We need to model the snowflake.account_usage.access_history, since it contains a bunch of nested JSON columns that aren't easy to query. We need to be able to answer questions like:

  1. most expensive queries against a particular table with poor pruning (help inform clustering keys)
  2. most frequently executed queries against a table (help inform clustering keys)
  3. tables that haven't been accessed in last X days

Bunch of good work in here for reference: https://github.com/jaysobel/dbt-snowflake-queries. Need to connect with Jay, he had found some gotchas with these models.

@ian-whitestone
Copy link
Contributor Author

a really cool extension of this would be to use an AST parser or SQL fluff to include columns like:

  • array of columns used in join condition
  • array of columns used in where clause

This would be useful for providing clustering key recommendations

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

No branches or pull requests

1 participant