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: 

Trigger.once mode recommendation

User16783853906
Contributor III

When is it recommended to use Trigger.once mode compared to fixed processing intervals with micro batches?

2 REPLIES 2

User16783853906
Contributor III

With trigger.once mode, only one micro batch will be executed to process the latest data and application stops on its own once the processing is complete. This is helpful in cases where you need to periodically process everything that is available since the last processed data.

Fore more information on this, refer to - https://spark.apache.org/docs/latest/structured-streaming-programming-guide.html#triggers

brickster_2018
Esteemed Contributor
Esteemed Contributor

Also note, the configurations like maxFilesPerTrigger, maxBytesPerTrigger are ignored with Trigger.Once.

Streaming queries with significantly less throughput can switch to Trigger.Once to avoid the continuous execution of the job checking the availability of the data.

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!