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

How to run sparkStream for earlier (not future messages)

alejandrofm
Valued Contributor

Hi, I'm listening to a stream for kinesis, don't need the data in real-time, so I could run it on an hourly basis looking to achieve two things:

-Save money by don't have a cluster up 24/7

-Have bigger files saved for each read

The stream is constant so I cant use once=True because it never ends, that it what I use to read from buckets. The idea is that it reads to the last data available at the moment it started and then gracefully exits.

Can this be done?

Thanks!

2 REPLIES 2

Kaniz
Community Manager
Community Manager

Hi @Alejandro Martinez​ , Here is a somewhat similar issue on S.O. Please look and let us know if that helped.

alejandrofm
Valued Contributor

Hi, thanks for the link, the solution in that thread is for Kafka and It seems to be a different issue.

I need to stop the process when I reach the events that were available at the time I started listening, so the process will complete NOT when the queue is empty but when I reached a specific point in time on the queue.

Thanks!

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.