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: 

how to stream change feed from delta table when its schema is changed?

raghav99
New Contributor II

Hi Team,
I would like to know how we can continue streaming change data feed from a delta table when its schema is changed ( non-additive schema changes like drop/rename column / schema migration ).

I came across schemaTrackingLocation in readStream but not sure how to use it for continue streaming the change feeds. I am using Delta Lake v3.0 and Databricks 14.0.
Thank you in advance.

 

1 REPLY 1

Thank you for the response @Retired_mod .

So lets consider one or many schema changes per table. It can be combinations of drop , rename column , add new column and updating column's datatype, etc.
I am using schemaTrackingLocation and have observed stream breaking with StreamingQueryException.
It updates the schema tracking log but since it has multiple schema changes , I have to rerun the stream multiple times to keep on updating the schema tracking maybe because there are lots of schema updates happened on the table while doing these migration combinations.

I am not sure how many times I need to re-trigger the stream to get it to final updated schema on my schemaTrackingLocation. 
So is this an expected behaviour or a bug ? 

I was under impression looking at the docs that with schemaTrackingLocation enabled , stream doesn't fail and it will keep on updating and picking up the right schema from source table.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now