Skip to content

Commit

Permalink
Merge pull request #114 from alanmcruickshank/ac/specify_stage
Browse files Browse the repository at this point in the history
Qualify artifact read paths
  • Loading branch information
NiallRees authored Apr 4, 2022
2 parents 79109a9 + de0659d commit 0127c46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion macros/upload_artifacts.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
$1:metadata:generated_at::timestamp_ntz as generated_at,
metadata$filename as path,
regexp_substr(metadata$filename, '([a-z_]+.json)') as artifact_type
from @{{ src_dbt_artifacts }}
from @{{ src_dbt_artifacts }}/{{ invocation_id }}
) as new_data
on old_data.generated_at = new_data.generated_at
-- NB: No clause for "when matched" - as matching rows should be skipped.
Expand Down
6 changes: 3 additions & 3 deletions macros/upload_artifacts_v2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
run_results.$1:metadata as metadata,
run_results.$1:args as args,
run_results.$1:elapsed_time::float as elapsed_time
from @{{ artifact_stage }} as run_results
from @{{ artifact_stage }}/{{ invocation_id }} as run_results

)

Expand Down Expand Up @@ -94,7 +94,7 @@
metadata:env:DBT_CLOUD_RUN_ID::int as dbt_cloud_run_id,
{{ make_artifact_run_id() }} as artifact_run_id,
metadata:generated_at::timestamp_tz as generated_at
from @{{ artifact_stage }} as run_results
from @{{ artifact_stage }}/{{ invocation_id }} as run_results

)

Expand Down Expand Up @@ -147,7 +147,7 @@
{{ make_artifact_run_id() }} as artifact_run_id,
metadata:generated_at::timestamp_tz as generated_at,
manifests.$1 as data
from @{{ artifact_stage }} as manifests
from @{{ artifact_stage }}/{{ invocation_id }} as manifests

)

Expand Down

0 comments on commit 0127c46

Please sign in to comment.