-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7da5aae
commit 295c99b
Showing
2 changed files
with
44 additions
and
1 deletion.
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
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,37 @@ | ||
version: 2 | ||
|
||
models: | ||
- name: cost_per_serverless_task_run | ||
description: | | ||
A model that splits the hourly cost per serverless task from stg_serverless_task_history back to the queries | ||
triggered by individual tasks runs, taking into account the fraction of time that each run took in the hour. | ||
The logic and code are heavily inspired by what the cost_per_query model does for compute cost. | ||
columns: | ||
- name: query_id | ||
description: Primary key. Internal/system-generated identifier for the SQL statement. | ||
tests: | ||
- unique | ||
- not_null | ||
- name: start_time | ||
description: Query statement start time (in the UTC time zone). The table is naturally clustered on this column, meaning your queries will run much faster if you filter records using this column. | ||
- name: end_time | ||
description: Query statement end time (in the UTC time zone). | ||
- name: task_database_id | ||
description: Internal/system-generated identifier for the database that contains the task. | ||
- name: task_database_name | ||
description: Name of the database that contains the task. | ||
- name: task_schema_id | ||
description: Internal/system-generated identifier for the schema that contains the task. | ||
- name: task_schema_name | ||
description: Name of the schema that contains the task. | ||
- name: task_name | ||
description: Name of the task. | ||
- name: execution_start_time | ||
description: When the query began executing on the warehouse (in the UTC time zone). This will always be after the start_time. | ||
- name: serverless_task_cost | ||
description: Total serverless task cost associated with the query. | ||
- name: serverless_task_credits | ||
description: Total serverless task credits associated with the query. | ||
- name: currency | ||
description: Spend currency, retrieved from Snowflake's daily rate sheet | ||
|