Seven Stars

Talend Job Start Date

Hi,

 

I have a job which starts before midnight and ends next day.

There are multiple child jobs being called and many output files generated.

Is there any way to get the job start date during any child job execution (any component or java code to get the talend job start date) ?

 

Say, my talend job started on 01/01/2017 and ended on 02/01/2017, so if i want to know the talend job start date when my current system date is 02/01/2017, then how can i achieve it ?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Twelve Stars TRF
Twelve Stars

Re: Talend Job Start Date

The simplest, store the starting date into a context variable shared with child jobs.


TRF
4 REPLIES
Twelve Stars TRF
Twelve Stars

Re: Talend Job Start Date

The simplest, store the starting date into a context variable shared with child jobs.


TRF
Seven Stars

Re: Talend Job Start Date

Thanks,
I am also thinking the same but was curious if we have any talend expression or component to get the talend job start date which might be useful for any other requirement.
Twelve Stars

Re: Talend Job Start Date

You can use the AMC functionality, but this might be a bit of overkill (https://www.rilhia.com/tutorials/talend-activity-monitoring-console-amc). Alternatively you can use the tStatCatcher component (https://www.talendbyexample.com/talend-tstatcatcher-component.html). The tStatCatcher component is technically part of the AMC, but allows you to do what you want with the data within the job.

Rilhia Solutions
Ten Stars

Re: Talend Job Start Date

If you just need the date, connect a tSetGlobalVar to a tPrejob component, and create a variable with the expression TalendDate.getDate("yyyy-MM-dd")