cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

creation of tables with cdc

alexgv12
New Contributor III

I am using cdc to create different tables, these tables can have one or more dependencies, what is the best practice to create these tables without losing records or changes in both the base table and the join tables?

for example

select * from

(

SELECT *, rank() over (partition by cola order by _commit_version desc) as rank

FROM table_changes('database.table', 3)

WHERE _change_type !='update_preimage'

        ) a

WHERE a.rank=1

) as b

inner join

database.table2 as a

on a.cola = b.cola

my fear is that if a change does not occur in table but in table2 it is possible that I will lose the changes in table2.

1 REPLY 1

alexgv12
New Contributor III

more detail