Skip to content

Commit 49f2805

Browse files
joining two tables in warehouse worked!
1 parent 05f44a5 commit 49f2805

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

dbt/models/pg_test/person_car.sql

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ with source_person as(
44
SELECT * FROM {{ source('masterdb', 'person') }}
55
),
66

7-
with source_car as (
7+
source_car as (
88
SELECT * FROM {{ source('masterdb', 'car') }}
9-
)
9+
),
10+
11+
joined as (
12+
SELECT * FROM source_person LEFT JOIN source_car USING (car_uid)
13+
),
1014

1115
final as (
12-
SELECT * FROM source_person
16+
SELECT * FROM joined
1317
)
1418

1519
select * FROM final

0 commit comments

Comments
 (0)