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.