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

{{start_time}} isn't accurate and doesn't behave logically for multi-task jobs

assapin
New Contributor

I am trying to run an incremental data processing job using python wheel.

The job is scheduled to run e.g. every hour.

For my code to know what data increment to process, I inject it with the {{start_time}} as part of the command line, like so

["end_date={{start_time}}"]

I have noticed two things:

* The start_time is seems to refer to when the scheduler actually woke up, vs. when it was meant to wake up. e.g. instead of passing the exact on-the-hour time, it can contain 2-3 seconds past the hour.

* When I run a job with two tasks which run one after the other, they each get a different {{start_time}} value. Since scheduling is done on job level vs. task level, and you have a feature for injecting the time to the job, I can't see what is the point of passing different values to each task.

Each one of these behaviors make {{start_time}} not reliable enough for processing time windows of data.

Other standard schedulers like Airflow and Prefect do pass the correct "planned job trigger time" to the jobs, and are reliable enough for processing time windows.

see here and here.

Can you share what's the best practice for injecting the planned trigger-time reliably to the job and all of its tasks?

Thanks

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