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

Add credit consumption to cost per query #65

Open
ian-whitestone opened this issue Jan 9, 2023 · 6 comments
Open

Add credit consumption to cost per query #65

ian-whitestone opened this issue Jan 9, 2023 · 6 comments

Comments

@ian-whitestone
Copy link
Contributor

Some users may prefer to work with credits instead of cost.

One use case could be forecasting model cost and a new credit rate.

@ian-whitestone
Copy link
Contributor Author

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.

@yingyingqiqi
Copy link
Contributor

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.

@ian-whitestone
Copy link
Contributor Author

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

@yingyingqiqi
Copy link
Contributor

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?

@ian-whitestone
Copy link
Contributor Author

ian-whitestone commented Aug 15, 2023

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?

@yingyingqiqi
Copy link
Contributor

Yes, I will create a new PR later.

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

2 participants