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:ย 

What is the behaviour of starting version with spark structured streaming ?

Maatari
New Contributor III

Looking into the following

https://docs.databricks.com/en/structured-streaming/delta-lake.html#specify-initial-position

I am unclear as to what is the exact difference (if any) between 

"startingVersion: The Delta Lake version to start from. Databricks recommends omitting this option for most workloads. When not set, the stream starts from the latest available version including a complete snapshot of the table at that moment."

and 

"To return only the latest changes, specify latest."

The two scenarios are:

  • no startingVersion
  • startingVersion = latest

 

Are both scenarios equal, or the first one consume the latest snapshot of the table first and whatever comes next, and the second one only whatever comes after the latest snapshot. I am confused about the two. 

Could anyone clarify it for me please ?

 

1 REPLY 1

VZLA
Databricks Employee
Databricks Employee

The key difference is that not specifying startingVersion will include the current snapshot of the table in the stream, while setting startingVersion to latest will only process new changes from that point onward.

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