Skip to content

Commit

Permalink
Add columns for serverless task history
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandobrito authored and NiallRees committed Jun 15, 2024
1 parent 519670b commit b0e69f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
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 b0e69f5

Please sign in to comment.