Skip to content

Commit 4d9029c

Browse files
Merge pull request #201 from dbt-labs/fix/star-source-dependency
distinct source to model relationships
2 parents c0f640d + 032adb6 commit 4d9029c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
-- this needs to be valid SQL for the fake test to run
22
-- depends on: {{ source('source_1', 'table_1') }}
3+
-- depends on: {{ source('source_1', 'table_1') }}
34
select 1 as id
45
union all
56
select 2 as id

models/marts/dag/fct_multiple_sources_joined.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
-- this model finds cases where a model references more than one source
22
with direct_source_relationships as (
3-
select
4-
*
3+
select distinct
4+
child,
5+
parent
56
from {{ ref('int_all_dag_relationships') }}
67
where distance = 1
78
and parent_resource_type = 'source'

0 commit comments

Comments
 (0)