-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v5.0.0] Add query acceleration costs, incrementalize cost per query,…
… account for new service type (#141) * Lotta tings * Fix typos * Add changelog * Update desc * Make sqlfluff happy
- Loading branch information
1 parent
4533476
commit b69f913
Showing
11 changed files
with
113 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## dbt-snowflake-monitoring 5.0.0 - January 14, 2024 | ||
|
||
### Features | ||
|
||
- Add query acceleration costs and update cost per query algorithm to include them ([#141](https://github.com/get-select/dbt-snowflake-monitoring/pull/141)) | ||
- Make cost_per_query model incremental ([#141](https://github.com/get-select/dbt-snowflake-monitoring/pull/141)) | ||
|
||
### Breaking Changes | ||
|
||
- Add entity_id to stg_metering_history ([#141](https://github.com/get-select/dbt-snowflake-monitoring/pull/141)) | ||
|
||
To upgrade from 4.x.x, you'll need to full refresh the `stg_metering_history` model. | ||
|
||
### Fixes | ||
|
||
- Support quoting: true ([#139](https://github.com/get-select/dbt-snowflake-monitoring/pull/139)) | ||
|
||
### Contributors | ||
- [@ernestoongaro](https://github.com/ernestoongaro) (Fixes) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
{{ config(materialized='incremental') }} | ||
{{ config( | ||
materialized='incremental', | ||
unique_key=['service_type', 'start_time', 'entity_id'], | ||
) }} | ||
|
||
select | ||
name, | ||
credits_used_compute, | ||
service_type, | ||
start_time, | ||
end_time, | ||
service_type, | ||
entity_id, | ||
name, | ||
credits_used_compute, | ||
credits_used_cloud_services, | ||
credits_used | ||
from {{ source('snowflake_account_usage', 'metering_history') }} | ||
|
||
{% if is_incremental() %} | ||
where end_time > (select max(end_time) from {{ this }}) | ||
-- account for changing metering data | ||
where end_time > (select coalesce(dateadd(day, -7, max(end_time)), '1970-01-01') from {{ this }}) | ||
{% endif %} | ||
|
||
order by start_time asc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters