-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create data models for Snowflake cost tracking #427
Comments
@ian-r-rose I just skimmed through this explanation of how Canva has built their own Snowflake cost usage reporting tools over the years: https://www.canva.dev/blog/engineering/our-journey-to-snowflake-monitoring-mastery/ An interesting read, and they also mention this dbt package which apparently does everything the Canva team had custom built for themselves: https://select.dev/docs/dbt-snowflake-monitoring Might be worth a look! |
Neat, let's evaluate it! There are a couple of things I think we would look for out of a package:
|
It looks like the dbt user requires the imported privilege and the account requires ORGADMIN access. I'll test it out and see if I have any errors. |
I've created all the following staging models AUTOMATIC_CLUSTERING_HISTORY Next step is to create incremental intermediate models. |
Re-opened this as I believe it was closed by mistake when the PR closed. Per @tnrahim there are some additional steps needed on this (next step to create incremental intermediate models). |
We are currently not doing a good job of tracking our Snowflake credit usage. We should create some data models here to give us more visibility into costs.
Most of the relevant information will be in the
SNOWFLAKE.ORGANIZATION_USAGE
schema. Some views (non-exhaustive) that track credit usage are:AUTOMATIC_CLUSTERING_HISTORY
DATA_TRANSFER_HISTORY
DATABASE_STORAGE_USAGE_HISTORY
MATERIALIZED_VIEW_REFRESH_HISTORY
METERING_DAILY_HISTORY
PIPE_USAGE_HISTORY
STAGE_STORAGE_USAGE_HISTORY
STORAGE_DAILY_HISTORY
WAREHOUSE_METERING_HISTORY
There are also a couple of views that would be helpful if we could use them, but do not work when Snowflake is purchased through a reseller:
USAGE_IN_CURRENCY_DAILY
REMAINING_BALANCE_DAILY
The text was updated successfully, but these errors were encountered: