Pause, wait or Sleep considerations (parallel branches)

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

-----------

View solution in original post


All Replies
Highlighted
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

-----------
Highlighted
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 !
Highlighted
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

-----------

View solution in original post

2019 GARTNER 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

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog