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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Reg: How to pass a filter condition as variable in Input/row component

Hi,
I am having a Date filter condition in a query. The value supposed to be retrieved from a file and passed to the query. Is there any why to do it in talend.
version: Talend 3.1
Input Component: tOracleInput with the following Sql
Sql: Select * from Table_Name where Day_id >
Output component: tnetezzaOutput
Thanks in Advance,
Arun
Labels (2)
2 Replies
Anonymous
Not applicable
Author

Hello
Yes, you can pass a date to the sql query dynamically. Your job looks like
tFileInputDelimited-->tJavaRow-->tFlowToIterate-->tOracleInput-->tnetezzaOutput
tFileInputDelimited: get date value from a file
tJavaRow: format the date and set the value to a context var
tOracleInput: "select * from table_name where day_id >'"+context.date+"'"
about tFlowToIterate component, see 5827

Best regards

shong
Anonymous
Not applicable
Author

Shong,
I Just Enabled Implicit Context option in the Job->Extra. And Set the file location which has the date values need to be passed. Now everything is Working fine. The script inside the toracleInput is same as what you replied.
Thanks a Lot,
Arun