I created my table using SCD type 2 in SQL. I need to do full refresh to load all of the data. Whenever I update data in my source table, in my new table scd_target I see only the latest record, history is not being saved.
CREATE OR REFRESH STREAMING TABLE scd_target;
APPLY CHANGES INTO live.scd_target
FROM (
SELECT id,
name,
surname,
updated_at
FROM stream(sources_test.sources_test.source)
) KEYS (name)
SEQUENCE BY updated_at
STORED AS SCD TYPE 2;
I need to use SQL since we are using it for other stuff in DLT pipeline