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

How to filter input on value from lookup flow?

Hi
I want to read a delimited file and insert the rows into a database table where file.column0 > max(database.table.primary_key).
I've created my delimited file main input and my database output OK. I've also created a query as a lookup flow:
select max(recdate) from vws
However I can't figure pout how to connect these with the right components to extract only the data I want. I did think that tFilterRow would do the job, particularly as the reference Guide says:
Compares a column from the main flow with a reference column from the lookup flow
However all the examples (and my trials with it) suggest that it can't read a lookup flow, you have to hard code the values you want to filter on. I want to get the value to filter on from thee database each time the job is run.
Hopefully someone can point me in the right direction.
Thanks
David
Labels (2)
11 Replies
Anonymous
Not applicable
Author

Hi
I did some more rooting around in the forum and tests with my job. I put a tJavaRow between my tFileDelimited and my tFilterRow and included a system call to pint the value of context.maxDate. Sure enough it was null.
Then I found this thread https://community.talend.com/t5/Design-and-Development/tRunJob-retrieve-context-variable-value-redef... which seems to suggest that you cannot pass context vairable values from a child job to its parent without writing the value to a temp store and reading it back in again.
That would explain why the context variable has a correct value in the top part of the job and a null value in the main flow. Is there a simple way around this?
Regards
David
Anonymous
Not applicable
Author

Hello David
Your job is different from topic1083. There are a father job and some child jobs in topic1083, but your job is a single job. I think you have miss someting or have some bad settings. Please export your job and send it to me via email, I will check it.
Best regards
shong