Pause, wait or Sleep considerations (parallel branches)

Four Stars

Pause, wait or Sleep considerations (parallel branches)

Hello all !

 

Please consider this situation : I have a job and at a specific moment I have 2 branches running in parallel.

What I would like to obtain is to have one branch starting 10 seconds after the other. I thought about using tSleep component but it appears that this component pauses the whole job an not the branch where it is located.

Ugly workaround : using a tLoop in order to waste some time doing nothing.

 

But I'm sure there is a clean way to answer this question. What's your opinion ? (Please avoid a solution based on subjobs, I would like to avoid reconstructing the whole job)

 

Thanks for your help !


Accepted Solutions
Forteen Stars

Re: Pause, wait or Sleep considerations (parallel branches)

You can choose any (mean - file or database),

 

for example I use similar for prevent accidental execution

Case 1 - Job store to database timestamp, and first component in Job read this timestamp, and if it same month - stop execution, send alarm for investigation and manual reset if need redo

 

Case 2 - Job analyse day of month and if it not 1st - stop 

Case 3 - Job check result of other Job, and if it not satisfy rules - stop again (alarm and etc)

 

in my case it tMySQLInput  or tMySQLInput + tJavaFlex and then 2 flow by triggers Run-If, one for success and one for error

-----------

All Replies
Forteen Stars

Re: Pause, wait or Sleep considerations (parallel branches)

as variant:

store start time in database (csv file as variant)

first step - read time, and check time difference

if difference less than 10 sec - sleep for difference

store it own start time

continue all other steps

-----------
Four Stars

Re: Pause, wait or Sleep considerations (parallel branches)

Thanks for your answer.
Just to be sure I properly understand, how would you implement this solution ? (Using which components ?)

Again, thank you for your contribution !
Forteen Stars

Re: Pause, wait or Sleep considerations (parallel branches)

You can choose any (mean - file or database),

 

for example I use similar for prevent accidental execution

Case 1 - Job store to database timestamp, and first component in Job read this timestamp, and if it same month - stop execution, send alarm for investigation and manual reset if need redo

 

Case 2 - Job analyse day of month and if it not 1st - stop 

Case 3 - Job check result of other Job, and if it not satisfy rules - stop again (alarm and etc)

 

in my case it tMySQLInput  or tMySQLInput + tJavaFlex and then 2 flow by triggers Run-If, one for success and one for error

-----------

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now