<?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 the updated rows in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/how-to-filter-the-updated-rows/m-p/2325307#M94919</link>
    <description>&lt;P&gt;I had the same question and used your approach.&lt;/P&gt; 
&lt;P&gt;In my case I only have one primary key (ID#) and one datafield "Data", so I added in the tmap a variable :&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Initial3.Data.equals(After3.Data)&lt;/P&gt; 
&lt;P&gt;and in the most right pane I add the expression filter :&lt;/P&gt; 
&lt;P&gt;Var.data_changed==false.&amp;nbsp;I work with a dummy files where the original table is "BEFORE" and the changed table (from which I want to know what lines are updates is "AFTER". AFTER is my main and BEFORE is my lookup. The values are:&lt;/P&gt; 
&lt;P&gt;BEFORE:&lt;/P&gt; 
&lt;P&gt;--------------&lt;/P&gt; 
&lt;P&gt;1,A&lt;BR /&gt;2,B&lt;BR /&gt;3,C&lt;BR /&gt;5,E&lt;BR /&gt;6,F&lt;BR /&gt;7,K&lt;BR /&gt;AFTER :&lt;/P&gt; 
&lt;P&gt;------------&lt;/P&gt; 
&lt;P&gt;1,A&lt;BR /&gt;3,B&lt;BR /&gt;4,D&lt;BR /&gt;5,K&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I notice the first update (where for primary key 3, the data value was changed from C to B) is detected correctly, but when he wants to compare the next line (4,D which is not present in the BEFORE file) then I get an error "Exception in component tMap_3 java.lang.NullPointerException" exactly at the line where I put "&lt;SPAN&gt;Initial3.Data.equals(After3.Data)&lt;/SPAN&gt;".&lt;/P&gt; 
&lt;P&gt;Any idea on what is causing this??&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 05 Apr 2018 16:26:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-04-05T16:26:44Z</dc:date>
    <item>
      <title>how to filter the updated rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-filter-the-updated-rows/m-p/2325303#M94915</link>
      <description>&lt;P&gt;hello everybody,&lt;/P&gt; 
&lt;P&gt;i'm trying to setup a talend job, this is my current situation:&lt;/P&gt; 
&lt;P&gt;I have an Oracle&amp;nbsp;table A, let's say it is something like this:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;ID NAME SURNAME AGE&lt;/P&gt; 
&lt;P&gt;P56 John&amp;nbsp;&amp;nbsp;&amp;nbsp; Smith&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 36&lt;/P&gt; 
&lt;P&gt;P67 Micheal Douglas&amp;nbsp;&amp;nbsp;&amp;nbsp; 21&lt;/P&gt; 
&lt;P&gt;P78 Will&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Samuelson&amp;nbsp; 56&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I also have a file B, which contains the entire table A data, updated to the latest version.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;ID NAME SURNAME AGE&lt;/P&gt; 
&lt;P&gt;P56 John&amp;nbsp;&amp;nbsp;&amp;nbsp; Smithson&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;35&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;-- updated row&lt;/P&gt; 
&lt;P&gt;P67 Micheal Douglas&amp;nbsp;&amp;nbsp;&amp;nbsp; 21&lt;/P&gt; 
&lt;P&gt;P78 Will&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Samuelson&amp;nbsp; 56&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I need&amp;nbsp;to produce a new&amp;nbsp;Oracle table C, containing only the rows that need to be updated (i dont need to consider additional rows or deleted rows).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So in this example, i need a table C containing only&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;ID NAME SURNAME AGE&lt;/P&gt; 
&lt;P&gt;P56 John&amp;nbsp;&amp;nbsp;&amp;nbsp; Smithson&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;35&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;How can i do this? I'm currently trying in the following way:&lt;/P&gt; 
&lt;P&gt;a tMap which takes 2 inputs, the file and the table A, and goes out to the new table C, i joined the 2 inputs via inner join, using the ID as a key.&lt;/P&gt; 
&lt;P&gt;I tried to add a filter to table A, in order to select only the rows where some data has changed, but i'm&amp;nbsp;still moving my first steps in Talend and i&amp;nbsp;cannot understand how to do that, any hint?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;thanks in advance&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 11:49:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-filter-the-updated-rows/m-p/2325303#M94915</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-12T11:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to filter the updated rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-filter-the-updated-rows/m-p/2325304#M94916</link>
      <description>&lt;P&gt;&lt;SPAN&gt;In tMap, use a inner join between the table and the file based on all the fields.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Select the "Catch lookup inner join&amp;nbsp;reject" option on the tMap output flow.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You'll get a the rows which are in the table and not in the file (new or modified).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you want to identify news and deleted rows, you need to start with 2&amp;nbsp;tMap with join based on the Id field (1st with db as main and 2nd with file as main).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 12:22:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-filter-the-updated-rows/m-p/2325304#M94916</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-07-12T12:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to filter the updated rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-filter-the-updated-rows/m-p/2325305#M94917</link>
      <description>&lt;P&gt;Does this help you?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 07:18:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-filter-the-updated-rows/m-p/2325305#M94917</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-07-14T07:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to filter the updated rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-filter-the-updated-rows/m-p/2325306#M94918</link>
      <description>&lt;P&gt;Hi rekotc,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;here is another suggestion:&lt;/P&gt; 
&lt;P&gt;In tMap join tableA as main input with fileB as lookup on the ID field as you have done&amp;nbsp;already.&lt;/P&gt; 
&lt;P&gt;In the Variable Panel, create a boolean variable "name_changed" which compares the column Name from tableA to the column Name of your fileB, returning true when they are different.&lt;/P&gt; 
&lt;P&gt;Repeat the last step for Surname and Age accordingly.&lt;/P&gt; 
&lt;P&gt;Create a boolean variable called "update_flag" which is true if any of the previous comparison results are true.&lt;/P&gt; 
&lt;P&gt;Use this update_flag in the filter section of your output, so only those rows with a change in some column(s) are sent to tableC.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Best regards,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thomas&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 10:23:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-filter-the-updated-rows/m-p/2325306#M94918</guid>
      <dc:creator>ThWabi</dc:creator>
      <dc:date>2017-07-14T10:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to filter the updated rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-filter-the-updated-rows/m-p/2325307#M94919</link>
      <description>&lt;P&gt;I had the same question and used your approach.&lt;/P&gt; 
&lt;P&gt;In my case I only have one primary key (ID#) and one datafield "Data", so I added in the tmap a variable :&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Initial3.Data.equals(After3.Data)&lt;/P&gt; 
&lt;P&gt;and in the most right pane I add the expression filter :&lt;/P&gt; 
&lt;P&gt;Var.data_changed==false.&amp;nbsp;I work with a dummy files where the original table is "BEFORE" and the changed table (from which I want to know what lines are updates is "AFTER". AFTER is my main and BEFORE is my lookup. The values are:&lt;/P&gt; 
&lt;P&gt;BEFORE:&lt;/P&gt; 
&lt;P&gt;--------------&lt;/P&gt; 
&lt;P&gt;1,A&lt;BR /&gt;2,B&lt;BR /&gt;3,C&lt;BR /&gt;5,E&lt;BR /&gt;6,F&lt;BR /&gt;7,K&lt;BR /&gt;AFTER :&lt;/P&gt; 
&lt;P&gt;------------&lt;/P&gt; 
&lt;P&gt;1,A&lt;BR /&gt;3,B&lt;BR /&gt;4,D&lt;BR /&gt;5,K&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I notice the first update (where for primary key 3, the data value was changed from C to B) is detected correctly, but when he wants to compare the next line (4,D which is not present in the BEFORE file) then I get an error "Exception in component tMap_3 java.lang.NullPointerException" exactly at the line where I put "&lt;SPAN&gt;Initial3.Data.equals(After3.Data)&lt;/SPAN&gt;".&lt;/P&gt; 
&lt;P&gt;Any idea on what is causing this??&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 16:26:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-filter-the-updated-rows/m-p/2325307#M94919</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-05T16:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to filter the updated rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-filter-the-updated-rows/m-p/2325308#M94920</link>
      <description>&lt;P&gt;Hello&amp;nbsp;JB000000001,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suppose you are using a left outer join? In "BEFORE", the value "4,D" is not found and that is why "Initial3.Data" is null and you cannot call "equals()" on a null value. Add a condition to check "Inital3.Data" for null, e.g. like this:&lt;/P&gt;&lt;PRE&gt;Initial3.Data == null ? false : Initial3.Data.equals(After3.Data)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that was helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 08:42:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-filter-the-updated-rows/m-p/2325308#M94920</guid>
      <dc:creator>ThWabi</dc:creator>
      <dc:date>2018-04-12T08:42:42Z</dc:date>
    </item>
  </channel>
</rss>

