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.

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