Hello,
The problem I’m having
i try to make a merge into from a source to another table in snwoflake using dbt cloud
this is the DDL and the line that i insert in snowflake
CREATE TABLE TRAV_DWH_DEV.TRAV_ISILOG.trav_test_macro (
id INT,
prenom STRING,
age INT
);
INSERT INTO TRAV_DWH_DEV.TRAV_ISILOG.trav_test_macro (id, prenom, age) VALUES
(1, 'axel', 30),
(2, 'francois', 25),
(3, 'hafsa', 40);
CREATE TABLE TRAV_DWH_DEV.TRAV_ISILOG.trav_test_macro_silver (
id INT,
prenom STRING,
age INT
);
INSERT INTO TRAV_DWH_DEV.TRAV_ISILOG.trav_test_macro_silver (id, prenom, age) VALUES
(1, 'axel', 30),
(2, 'francois', 25);
SELECT * FROM TRAV_DWH_DEV.TRAV_ISILOG.trav_test_macro_silver;
this is my code in dbt in the models folder
{{
config(
materialized='incremental',
unique_key='ID',
incremental_strategy='merge',
dest_table='TRAV_DWH_DEV.TRAV_ISILOG.trav_test_macro_silver'
)
}}
select * from {{ref('stg_trav__trav_test_macro')}}
when i click on preview i have those line from my source
but when i type dbt build the models is running without an issue but the new line from source is not add neither the update for francois (the age)
Where i’m wrong ?
Thanks in advance,
François