DBT: Job Run Results
DBT model name: job_run_results
Explore dependencies/lineage: link
Description
Run results of dbt invocations, enriched with jobs metadata. Each row is the result of a single job. This is a view on dbt_invocations.
Details
| Column | Type | Description |
|---|---|---|
No data tests defined 🧐
Not referenced by any model or exposure.
Models
Macros
edr_cast_as_timestamptimediff
No called script or script source not found.
{{ config(materialized="view", bind=False) }}
{% set job_run_started_at %}
min({{ elementary.edr_cast_as_timestamp("run_started_at") }})
{% endset %}
{% set job_run_completed_at %}
max({{ elementary.edr_cast_as_timestamp("run_completed_at") }})
{% endset %}
with
jobs as (
select
job_name,
job_id,
job_run_id,
{{ job_run_started_at }} as job_run_started_at,
{{ job_run_completed_at }} as job_run_completed_at,
{{
elementary.timediff(
"second", job_run_started_at, job_run_completed_at
)
}} as job_run_execution_time
from {{ ref("dbt_invocations") }}
where job_id is not null
group by job_name, job_id, job_run_id
)
select
job_name as name,
job_id as id,
job_run_id as run_id,
job_run_started_at as run_started_at,
job_run_completed_at as run_completed_at,
job_run_execution_time as run_execution_time
from jobs
-
Dbt path:
trase_ducklake.main_elementary.job_run_results -
Containing yaml link: trase/data_pipeline/models/run_results.yml
-
Model file: trase/data_pipeline/models/edr/run_results/job_run_results.sql