Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Configurable context variable for UTC current date

Hi,

 

How can I get the context variable configurable after generating the .bat file?

I am facing problem as sometimes I need to pass GETUTCDATE() function value and sometimes I need to pass TalendDate.parseDate("yyyy-MM-dd HH:mm:ss", TalendDate.formatDateInUTC("yyyy-MM-dd HH:mm:ss", TalendDate.getCurrentDate())) in context variable.

So how can I get this type of context configure in Talend Open Studio?

 

Thanks,

Dhara

Labels (3)
3 Replies
Anonymous
Not applicable
Author

Hi Dhara,

 

     You must be having some condition to determine which value to pick in this job. You can pass this condition as a flag value to the job or you can finalize the step before calling the Talend job using Windows commands itself.

 

     Either way, its a matter of doing an if condition check either within the Talend or using Windows commands.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Anonymous
Not applicable
Author

Hi,

 

Can you explain me about setting up a flag value using an example?

I am not exactly able to understand your point.

 

Thanks,

Dhara

Anonymous
Not applicable
Author

Hi,

 

   Let me rephrase my query.

 

When will you pass GETUTCDATE() function value as parameter to the job and on what occasion will you pass  TalendDate.parseDate("yyyy-MM-dd HH:mm:ss", TalendDate.formatDateInUTC("yyyy-MM-dd HH:mm:ss", TalendDate.getCurrentDate())) as the parameter? This means you have some condition to to pick the value from one among the two values.

 

Now, you need to pass the flag value which says true or false to pick the first value as parameter to the job. If the flag is false, your Talend job can pick the second value and store it to the context variable.

 

Please refer below community link to understand how to pass parameter to bat file.

 

https://community.talend.com/t5/Design-and-Development/How-to-pass-parameters-to-windows-batch-file/...

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved