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

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.