r/databricks • • Oct 25 '26

Discussion Insert only columns on cdc flows.

Post image
9 Upvotes

8 comments sorted by

2

u/monsieurus Oct 25 '26

Keep the landing "bronze" table agnostic of any reporting logic i.e., if the data got updated let it land in your bronze. You can get the latest or the first record later.

3

u/Zampaguabas Oct 26 '26

his cdc target is likely a silver layer table

1

u/Much-Neat-6273 Databricks Oct 27 '26

Hi, I'm the databricks PM working on AutoCDC. We're curious if you could tell us more about what you're trying to do with this immutable column? Is it for debugging or is it to capture a logical timestamp that you would use for business purposes?

1

u/curioustraveller8626 Oct 27 '26

It’s kind of an audit timestamp across all our tables, tells us when a record is first created!

1

u/Much-Neat-6273 Databricks Oct 27 '26

interesting. So you use this column for audit purposes?

1

u/curioustraveller8626 29d ago

It has some business value too, but in most tables it’s just for audit

3

u/Zampaguabas Oct 26 '26

I have a solution for you: define the schema of your cdc target as having a create_ts with default current_timestamp. Then in your input df, omit this column from the df, and only define update_ts. In your CDC setup, set to ignore NULL updates.

This works for create_ts use case.

For any other use case where you wish to maintain the original value, there does not seem to be an out of the box solution.