<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to filter input on value from lookup flow? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355977#M121608</link>
    <description>Hi 
&lt;BR /&gt;Here's my tFilterRow. In my schema the I've renamed the first column "recdate". 
&lt;BR /&gt;Cheers 
&lt;BR /&gt;David 
&lt;BR /&gt;Drat, image too big, will try again.</description>
    <pubDate>Mon, 13 Jul 2009 10:47:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-07-13T10:47:23Z</dc:date>
    <item>
      <title>How to filter input on value from lookup flow?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355973#M121604</link>
      <description>Hi
&lt;BR /&gt;I want to read a delimited file and insert the rows into a database table where file.column0 &amp;gt; max(database.table.primary_key).
&lt;BR /&gt;I've created my delimited file main input and my database output OK. I've also created a query as a lookup flow:
&lt;BR /&gt;select max(recdate) from vws
&lt;BR /&gt;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:
&lt;BR /&gt;Compares a column from the main flow with a reference column from the lookup flow
&lt;BR /&gt;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.
&lt;BR /&gt;Hopefully someone can point me in the right direction.
&lt;BR /&gt;Thanks
&lt;BR /&gt;David</description>
      <pubDate>Sat, 16 Nov 2024 13:52:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355973#M121604</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter input on value from lookup flow?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355974#M121605</link>
      <description>Hello David 
&lt;BR /&gt;First, define a context var called maxDate. 
&lt;BR /&gt;txxxInput(select max(recdate) from vws) --&amp;gt;tJavaRow(on tJavaRow, type in: context.maxDate=input_row.max) 
&lt;BR /&gt; | 
&lt;BR /&gt;onSubjobOk 
&lt;BR /&gt; | 
&lt;BR /&gt;tFileInputDelimited--&amp;gt;tFilterRow(add one condition, input column:column0, Function: empty, operator 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9xp.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153774i2D37DB4356C217DD/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9xp.png" alt="0683p000009M9xp.png" /&gt;&lt;/span&gt;,value:context.maxDate)--&amp;gt;txxxOutput 
&lt;BR /&gt;Best regards 
&lt;BR /&gt; shong</description>
      <pubDate>Mon, 13 Jul 2009 03:34:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355974#M121605</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-13T03:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter input on value from lookup flow?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355975#M121606</link>
      <description>Hi Shong 
&lt;BR /&gt;Many thanks for your help. I tried to follow your instructions; but I guess I've missed something becuase I'm getting a Java error when I run the Job: 
&lt;BR /&gt;Execution failed :Failed to generate code. 
&lt;BR /&gt; 
&lt;BR /&gt;I'll upload an image of the overall map below. 
&lt;BR /&gt;The database query (called max_recdate in the job) executes the SQL: 
&lt;BR /&gt; 
&lt;PRE&gt;select max(recdate) AS max_recdate from vws&lt;/PRE&gt; 
&lt;BR /&gt;This feeds into my tJavaRow component that executes: 
&lt;BR /&gt; 
&lt;PRE&gt;context.maxDate=input_row.max_recdate;&lt;/PRE&gt; 
&lt;BR /&gt;I've been through the schemas and checked that the columns referenced in the comparison are all Long (value is stored as YYYYMMDDHHMISS) 
&lt;BR /&gt;So what have I done wrong? 
&lt;BR /&gt;Thanks 
&lt;BR /&gt;David</description>
      <pubDate>Mon, 13 Jul 2009 10:05:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355975#M121606</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-13T10:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter input on value from lookup flow?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355976#M121607</link>
      <description>Hello
&lt;BR /&gt;Please upload a screenshot of basic setting of tFilterRow.
&lt;BR /&gt;Best regards
&lt;BR /&gt; shong</description>
      <pubDate>Mon, 13 Jul 2009 10:27:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355976#M121607</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-13T10:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter input on value from lookup flow?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355977#M121608</link>
      <description>Hi 
&lt;BR /&gt;Here's my tFilterRow. In my schema the I've renamed the first column "recdate". 
&lt;BR /&gt;Cheers 
&lt;BR /&gt;David 
&lt;BR /&gt;Drat, image too big, will try again.</description>
      <pubDate>Mon, 13 Jul 2009 10:47:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355977#M121608</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-13T10:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter input on value from lookup flow?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355978#M121609</link>
      <description>I think I've gotten a bit further, I don't think I'd sync the schemas in one of the components because I'm not getting the Java exception anymore; but now I'm getting these errors:</description>
      <pubDate>Mon, 13 Jul 2009 11:01:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355978#M121609</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-13T11:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter input on value from lookup flow?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355979#M121610</link>
      <description>Still making progress. I managed to get rid of the above errors. One was because in my tJavaRow component I'd called the context variable MaxDate instead of maxDate. The other two rows were beuase I'd ticked Advanced in the tFilterRow which had inserted extra code into the filter. 
&lt;BR /&gt;Now I'm getting another Java exception on executing the job. The error I get is: 
&lt;BR /&gt; 
&lt;PRE&gt;Exception in component tFilterRow_1&lt;BR /&gt;java.lang.NullPointerException&lt;BR /&gt;	at vws_update_j.vws_update_0_1.VWS_Update.tFileInputDelimited_2Process(VWS_Update.java:6323)&lt;BR /&gt;	at vws_update_j.vws_update_0_1.VWS_Update.runJobInTOS(VWS_Update.java:8494)&lt;BR /&gt;	at vws_update_j.vws_update_0_1.VWS_Update.main(VWS_Update.java:8389)&lt;/PRE&gt; 
&lt;BR /&gt;Line 6323 is the filter comparison: 
&lt;BR /&gt; 
&lt;PRE&gt;if ((row1.recdate &amp;gt; context.maxDate))&lt;BR /&gt;{&lt;/PRE&gt; 
&lt;BR /&gt;So I'm guessing (because I'm not a Java expert) that either row1.recdate or context.maxDate don't point to anything. You can see my next question coming; why not? 
&lt;BR /&gt;Regards 
&lt;BR /&gt;David</description>
      <pubDate>Mon, 13 Jul 2009 11:21:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355979#M121610</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-13T11:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter input on value from lookup flow?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355980#M121611</link>
      <description>Hello 
&lt;BR /&gt;first, you should make sure you have defined a context var called maxDate in context tab.
&lt;BR /&gt;second, you add a tLogRow component between tmysqlInpust and tJavaRow to display max_recdate on console, if it is null or not.
&lt;BR /&gt;Best regards
&lt;BR /&gt; shong</description>
      <pubDate>Mon, 13 Jul 2009 12:44:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355980#M121611</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-13T12:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter input on value from lookup flow?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355981#M121612</link>
      <description>I believe I have created my context variable - screen shot included.
&lt;BR /&gt;I inserted the tLogRow and the max_recdate has a value - so it seems it's a problem with the context variable?
&lt;BR /&gt;Regards
&lt;BR /&gt;David</description>
      <pubDate>Mon, 13 Jul 2009 16:05:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355981#M121612</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-13T16:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter input on value from lookup flow?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355982#M121613</link>
      <description>Here's another thing I don;t understand that my be related to why this isnt working.&lt;BR /&gt;To check the output of the tFileDelimited component I inserted a tLogRow between my tFileDelimited and tFilterRow. The tLogRow shows correct data values on the left hand side; but null values on the right hand side. So what's happening to the values?</description>
      <pubDate>Mon, 13 Jul 2009 16:37:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355982#M121613</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-13T16:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter input on value from lookup flow?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355983#M121614</link>
      <description>Hi 
&lt;BR /&gt;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. 
&lt;BR /&gt;Then I found this thread 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCtCxCAK" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/tRunJob-retrieve-context-variable-value-redefined-inside-a/td-p/62372&lt;/A&gt; 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. 
&lt;BR /&gt;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? 
&lt;BR /&gt;Regards 
&lt;BR /&gt;David</description>
      <pubDate>Mon, 13 Jul 2009 17:32:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355983#M121614</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-13T17:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter input on value from lookup flow?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355984#M121615</link>
      <description>Hello David 
&lt;BR /&gt;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. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt; shong</description>
      <pubDate>Tue, 14 Jul 2009 03:00:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-filter-input-on-value-from-lookup-flow/m-p/2355984#M121615</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-07-14T03:00:06Z</dc:date>
    </item>
  </channel>
</rss>

