cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group