dbt - Advanced Patterns
Identify the error in this dbt model SQL that attempts a multi-source fan-in:
WITH source_a AS (
SELECT id, val FROM table_a
),
source_b AS (
SELECT id, val FROM table_b
)
SELECT
COALESCE(a.id, b.id) AS id,
COALESCE(a.val, b.val) AS val
FROM source_a a
JOIN source_b b ON a.id = b.id
