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: 

Shutting down a job cluster, when streaming is over

pawelmitrus
Contributor

Hi,

As for now we already know that our application will be running 24/7 streaming constantly incoming data. The stream pipeline is very basic, however as for now it's enough to run this pipeline 1x per day (to save the costs of constantly running cluster). I'd like to write the code already to stream the data, instead of batch. I've been wondering how to detect that for a given time all new files were handled and streamed, so the cluster can shut down. When the job starts the next day, it will pick up only new files.

Could you please advise anything on that?

Thanks,

Pawel

1 ACCEPTED SOLUTION

Accepted Solutions

Shasidhar_ES
New Contributor III
New Contributor III

Use .trigger(once=True) or .trigger(availableNow=True) option which will pick only the new files https://docs.databricks.com/structured-streaming/triggers.html#configuring-incremental-batch-process...

View solution in original post

1 REPLY 1

Shasidhar_ES
New Contributor III
New Contributor III

Use .trigger(once=True) or .trigger(availableNow=True) option which will pick only the new files https://docs.databricks.com/structured-streaming/triggers.html#configuring-incremental-batch-process...

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!