-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from davidwitk/fix-dbt-models
Fix dbt and IMDb models
- Loading branch information
Showing
13 changed files
with
72 additions
and
3 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
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 @@ | ||
select * from {{ ref('stg_dbt_invocations') }} |
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 @@ | ||
select * from {{ ref('stg_dbt_model_executions') }} |
File renamed without changes.
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,7 @@ | ||
sources: | ||
- name: raw_dbt | ||
|
||
tables: | ||
- name: invocations | ||
- name: model_executions | ||
|
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,31 @@ | ||
with source as ( | ||
select * from {{ source('raw_dbt', 'invocations') }} | ||
), | ||
|
||
base as ( | ||
|
||
select | ||
command_invocation_id, | ||
dbt_version, | ||
project_name, | ||
run_started_at, | ||
dbt_command, | ||
full_refresh_flag, | ||
target_profile_name, | ||
target_name, | ||
target_schema, | ||
target_threads, | ||
dbt_cloud_project_id, | ||
dbt_cloud_job_id, | ||
dbt_cloud_run_id, | ||
dbt_cloud_run_reason_category, | ||
dbt_cloud_run_reason, | ||
env_vars, | ||
dbt_vars, | ||
invocation_args, | ||
dbt_custom_envs | ||
from source | ||
|
||
) | ||
|
||
select * from base |
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,29 @@ | ||
with source as ( | ||
select * from {{ source('raw_dbt', 'model_executions') }} | ||
), | ||
|
||
base as ( | ||
|
||
select | ||
command_invocation_id || node_id as model_execution_id, | ||
command_invocation_id, | ||
node_id, | ||
run_started_at, | ||
was_full_refresh, | ||
split_part(thread_id, '-', 2) as thread_id, | ||
status, | ||
compile_started_at, | ||
query_completed_at, | ||
total_node_runtime, | ||
rows_affected | ||
as materialization, | ||
schema | ||
as name, | ||
alias, | ||
message, | ||
adapter_response | ||
from source | ||
|
||
) | ||
|
||
select * from base |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.