get-select / dbt-snowflake-monitoring

A dbt package from SELECT to help you monitor Snowflake performance and costs
https://select.dev/docs/dbt-snowflake-monitoring
MIT License
219 stars 40 forks source link

Undo `service_type` transformation in `stg_rate_sheet_daily` and fix `service_type` filters in `cost_per_query` and `hourly_spend` #151

Closed stumelius closed 6 months ago

stumelius commented 8 months ago

This PR undoes the CASE statement that forced the daily rate sheet service_type to either STORAGE or COMPUTE in stg_rate_sheet_daily and fixes all service_type filters in the package accordingly.

I cross referenced the hard-coded service_type values with snowflake.organization_usage.rate_sheet_daily, snowflake.account_usage.metering_history and snowflake.account_usage.metering_daily_history. I also did manual validation checks to ensure that the compute spend values are being populated in the daily_spend model.

NiallRees commented 6 months ago

Thanks for your contribution @stumelius! This is included in release 5.1.0 :)