Skip to content

Commit

Permalink
refactor int_artifacts_by_project (#1558)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccerv1 authored May 29, 2024
1 parent 6ee14c8 commit d198849
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
select distinct
project_id,
artifact_id,
artifact_source_id,
artifact_source,
artifact_namespace,
artifact_name,
artifact_url
from {{ ref('int_all_artifacts') }}
artifacts.artifact_id,
artifacts.artifact_source_id,
artifacts.artifact_source,
artifacts.artifact_namespace,
artifacts.artifact_name,
artifacts.artifact_url,
artifacts.project_id,
projects.project_source,
projects.project_namespace,
projects.project_name
from {{ ref('int_all_artifacts') }} as artifacts
left join {{ ref('int_projects') }} as projects
on artifacts.project_id = projects.project_id
where artifacts.project_id is not null
22 changes: 10 additions & 12 deletions warehouse/dbt/models/marts/directory/artifacts_by_project_v1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
}}

select
artifacts_by_project.artifact_id,
artifacts_by_project.artifact_source_id,
artifacts_by_project.artifact_source,
artifacts_by_project.artifact_namespace,
artifacts_by_project.artifact_name,
projects.project_id,
projects.project_source,
projects.project_namespace,
projects.project_name
from {{ ref('int_artifacts_by_project') }} as artifacts_by_project
left join {{ ref('int_projects') }} as projects
on artifacts_by_project.project_id = projects.project_id
artifact_id,
artifact_source_id,
artifact_source,
artifact_namespace,
artifact_name,
project_id,
project_source,
project_namespace,
project_name
from {{ ref('int_artifacts_by_project') }}

0 comments on commit d198849

Please sign in to comment.