Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Passing timestamp dynamically to hql script in talend job

Hi All,

I want to pass timestamp dynamically  to hql script in Talend job.

I have to get the 20 days old date in a variable and pass that value to the hql script.

I have used thiverow in my Talend design to call hql script.

 

0683p000009M1bv.png

 

For example 20 days old timestamp is '2018-11-24 07:12:18.371'

 

This timestamp '2018-11-24 07:12:18.371has to be the below hql.

 

inserttbl=INSERT OVERWRITE TABLE mv_target PARTITION (name,cdt) SELECT * from mv_source WHERE cdt<=timestamp '2018-11-24 07:12:18.371'

 

Please help me.

 

Thanks in advance.

 

 

 

Labels (2)
2 Replies
Anonymous
Not applicable
Author

Hi All,

 

Please help me ASAP.

 

Thanks

Anonymous
Not applicable
Author

Hello,

TalendDate.addDate(TalendDate.getCurrentDate(),"-20","dd") returns 20 days old date. Feel free to let us know if it is OK with you.

Sorry for our silence. We do our best to answer as many posts as possible.

Best regards

Sabrina