Skip to content

Commit

Permalink
Merge pull request #160 from get-select/add-tasks-support
Browse files Browse the repository at this point in the history
Add dbt models for task_history and task_versions
  • Loading branch information
NiallRees authored Jun 15, 2024
2 parents 519670b + 09e41fe commit 77df8e4
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .changes/5.3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## dbt-snowflake-monitoring 5.3.0 - June 15, 2024

### Features

- Add new fields for stg_serverless_task_history ([#160](https://github.com/get-select/dbt-snowflake-monitoring/pull/160))

### Contributors
- [@fernandobrito](https://github.com/fernandobrito) (Features)

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).

## dbt-snowflake-monitoring 5.3.0 - June 15, 2024

### Features

- Add new fields for stg_serverless_task_history ([#160](https://github.com/get-select/dbt-snowflake-monitoring/pull/160))

### Contributors
- [@fernandobrito](https://github.com/fernandobrito) (Features)


## dbt-snowflake-monitoring 5.2.2 - June 09, 2024

### Features
Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'dbt_snowflake_monitoring'
version: '5.2.2'
version: '5.3.0'
config-version: 2

profile: dbt_snowflake_monitoring
Expand Down
3 changes: 3 additions & 0 deletions models/staging/stg_serverless_task_history.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ select
end_time,
task_id,
task_name,
schema_id,
schema_name,
database_id,
database_name,
credits_used
from {{ source('snowflake_account_usage', 'serverless_task_history') }}
Expand Down
8 changes: 7 additions & 1 deletion models/staging/stg_serverless_task_history.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2

models:
- name: stg_serverless_task_history
description: An incrementally materialized copy of the snowflake.account_usage.warehouse_metering_history view. See https://docs.snowflake.com/en/sql-reference/account-usage/serverless_task_history.html
description: An incrementally materialized copy of the snowflake.account_usage.serverless_task_history view. See https://docs.snowflake.com/en/sql-reference/account-usage/serverless_task_history.html
columns:
- name: start_time
description: The date and beginning of the hour (in the UTC time zone) in which the serverless task took place.
Expand All @@ -12,6 +12,12 @@ models:
description: Internal/system-generated identifier for the task.
- name: task_name
description: Name of the task.
- name: schema_id
description: Internal/system-generated identifier for the schema that contains the serverless task.
- name: schema_name
description: Name of the schema that contains the serverless task.
- name: database_id
description: Internal/system-generated identifier for the database that contains the serverless task.
- name: database_name
description: Name of the database in which the task is located.
- name: credits_used
Expand Down

0 comments on commit 77df8e4

Please sign in to comment.