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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
jtai168
Contributor
Contributor

Is it possible to pass Talend Routine in a SQL Query?

Hi,

I am wondering if it is possible to pass the value from the Talend Routine as a parameter to my PostgreSQL stored procedure. So the routine I am trying to use is:

"TalendDate.getLastDayOfMonth(TalendDate.addDate(TalendDate.getCurrentDate(),-1,"MM") )".

I need to pass the value into this query:

""CALL <stored procedure>('<date value>')"

Thanks,

J.

Labels (3)
1 Reply
JohnRMK
Creator II
Creator II

Hello,

 

theoretically it is possible to do it but it is not advised.

 

Try to have an additional step above with a tSetVarGlobal with the

key = "lastDay ..."

value = TalendDate.getLastDayOfMonth (TalendDate.addDate (TalendDate.getCurrentDate (), - 1, "MM"))

 

Then, when you call the stored procedure, you're just going to use the global variable

(with a ((datetime)globalMap.get("myKey")))