I always get the error unexpected identfiert while using dbt and i’m not sure what to do. My goal is to join two tables while referencing to my models.
I tried to ref on models to join them at the end of my query and i wanted to see my result:
WITH
lagerl23b_source AS (
SELECT *
FROM {{ ref ("int_LAGERL23B") }}
),
kdinfo01p_source AS (
SELECT *
FROM {{ ref("stg_KDINFO1P") }}
)
Beide_Kombiniert AS (
SELECT *
FROM lagerl23b_source
Join
kdinfo01p_source
on lagerl23b_source.PROD2_Kundennummer = kdinfo01p_source.PROD2_Kundennummer
)
SELECT *
FROM Beide_Kombiniert
1