cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Shutting down a job cluster, when streaming is over

pawelmitrus
New Contributor III

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...

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.