DBT: Dbt Run Results
DBT model name: dbt_run_results
Explore dependencies/lineage: link
Description
Run results of dbt invocations, inserted at the end of each invocation. Each row is the invocation result of a single resource (model, test, snapshot, etc). New data is loaded to this model on an on-run-end hook named 'elementary.upload_run_results' from each invocation that produces a result object. This is an incremental model.
Details
| Column | Type | Description |
|---|---|---|
model_execution_id |
string |
Execution id generated by joining the unique_id of the resource and the invocation_id. This is the unique key of each row in this model. |
unique_id |
string |
The unique id of the resource (would be similar for all executions of the same resource). |
invocation_id |
string |
The unique id of the invocation (would be similar for all resources executed on the same invocation). FK to dbt_invocations. |
generated_at |
string |
|
name |
string |
Resource name. |
message |
string |
Execution results message returned by dbt. |
status |
string |
Execution result status (success, error, pass, fail) |
resource_type |
string |
Resource type (model, test, snapshot, seed, etc) |
execution_time |
float |
Resource execution duration in seconds. |
execute_started_at |
string |
Start time of the execution. |
execute_completed_at |
string |
End time of the execution. |
compile_started_at |
string |
Start time of resource compile action. |
compile_completed_at |
string |
End time of resource compile action. |
rows_affected |
bigint |
|
full_refresh |
boolean |
Was this a full refresh execution. |
compiled_code |
string |
The compiled code (SQL / Python) executed against the database. |
failures |
bigint |
Number of failures in this run. |
query_id |
string |
Query ID in the data warehouse, if returned by the adapter (currently only supported in Snowflake and ClickHouse, is null for any other adapter). |
thread_id |
string |
Id of the thread of this resource run. |
adapter_response |
string |
Response returned by the adapter (Fields will be different for each adapters). |
No data tests defined 🧐
Macros
get_indexes_for_modelget_partition_byget_config_varget_default_table_typeget_default_incremental_strategyget_dbt_run_results_empty_table_query
No called script or script source not found.
{{
config(
materialized="incremental",
transient=False,
unique_key="model_execution_id",
on_schema_change="append_new_columns",
indexes=elementary.get_indexes_for_model(
"dbt_run_results",
[
{"columns": ["unique_id"]},
{"columns": ["unique_id", "created_at"]},
{"columns": ["model_execution_id"]},
],
),
partition_by=elementary.get_partition_by(),
full_refresh=elementary.get_config_var("elementary_full_refresh"),
meta={
"dedup_by_column": "model_execution_id",
"timestamp_column": "created_at",
"prev_timestamp_column": "generated_at",
},
table_type=elementary.get_default_table_type(),
incremental_strategy=elementary.get_default_incremental_strategy(),
)
}}
{{ elementary.get_dbt_run_results_empty_table_query() }}
-
Dbt path:
trase_ducklake.main_elementary.dbt_run_results -
Containing yaml link: trase/data_pipeline/models/run_results.yml
-
Model file: trase/data_pipeline/models/edr/dbt_artifacts/dbt_run_results.sql