dbt-snowflake-monitoring
dbt-snowflake-monitoring copied to clipboard
Add credit consumption to cost per query
Some users may prefer to work with credits instead of cost.
One use case could be forecasting model cost and a new credit rate.
Another use case brought up by a user if they have some discounts applied so multiplying by the cost per credit is incorrect for true cost.
Is anyone currently handling this matter? We signed the contract through Snowflake dealers, so we do not have data such as rate_sheet_daily, remaining_balance_daily and usage_in_currency_daily. If credit can be added, then we can use this tool. If no one is currently handling it, I am willing to contribute.
Hi @yingyingqiqi , no one is currently working to add this. If you are willing to contribute that would be great.
You just need to add the columns here: https://github.com/get-select/dbt-snowflake-monitoring/blob/main/models/cost_per_query.sql#L142-L148
Then again in here https://github.com/get-select/dbt-snowflake-monitoring/blob/main/models/query_history_enriched.sql#L45-L47
Here is our contributing guide: https://select.dev/docs/dbt-snowflake-monitoring/contributing
Hi @ian-whitestone If you have time, please check it for me, thanks.
Also, I would like to add credit to hourly_spend, daily_spend as well , is that ok with you?
Also, I would like to add credit to hourly_spend, daily_spend as well , is that ok with you?
sounds good 👍 , can we do that in a separate PR?
Yes, I will create a new PR later.