<?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: Insert Update and delete in destination file in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Insert-Update-and-delete-in-destination-file/m-p/2348330#M115473</link>
    <description>If you have fields such as unique key and version number, you may just use tMap with inner join with new file as main row and previous one as lookup. 
&lt;BR /&gt;If you have to be able to detect any change value for any field you have to get the MD5 value for all the fields but the key giving the following schema: keyField, md5Field. Then you can compare both versions using a tMap with new MD5 file as main row and previous one as lookup. Use keyField for the inner join. 
&lt;BR /&gt;If key exists but md5 is not the same value, the record has been updated. 
&lt;BR /&gt;If key doesn't exist, the record is new. 
&lt;BR /&gt;If you need to detect deleted records, you need an other subjob where you main row becomes the lookup, then rejected records are deleted ones. 
&lt;BR /&gt; 
&lt;BR /&gt;This link may help you 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCqWfCAK" target="_blank"&gt;https://community.talend.com/t5/Design-and-Development/How-to-generate-MD5-hash-value/td-p/43927&lt;/A&gt; 
&lt;BR /&gt;</description>
    <pubDate>Sun, 27 May 2018 09:57:02 GMT</pubDate>
    <dc:creator>TRF</dc:creator>
    <dc:date>2018-05-27T09:57:02Z</dc:date>
    <item>
      <title>Insert Update and delete in destination file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-Update-and-delete-in-destination-file/m-p/2348329#M115472</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a file input and file output,&lt;/P&gt;
&lt;P&gt;It's an every day load and i will get file everyday&lt;BR /&gt;I want to lookup my output file and check if there is any change in the new input file and if the record doesn't exists&amp;nbsp; in the output file , we need to insert into the output&amp;nbsp; file, if the row already exists , I need to update the data in the output file .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My source and target are files, So I'm stuck in the implementation part.&lt;BR /&gt;&lt;BR /&gt;Can anyone help me out on this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mahesh&lt;/P&gt;</description>
      <pubDate>Sun, 27 May 2018 09:28:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-Update-and-delete-in-destination-file/m-p/2348329#M115472</guid>
      <dc:creator>MaheswarReddy</dc:creator>
      <dc:date>2018-05-27T09:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Insert Update and delete in destination file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-Update-and-delete-in-destination-file/m-p/2348330#M115473</link>
      <description>If you have fields such as unique key and version number, you may just use tMap with inner join with new file as main row and previous one as lookup. 
&lt;BR /&gt;If you have to be able to detect any change value for any field you have to get the MD5 value for all the fields but the key giving the following schema: keyField, md5Field. Then you can compare both versions using a tMap with new MD5 file as main row and previous one as lookup. Use keyField for the inner join. 
&lt;BR /&gt;If key exists but md5 is not the same value, the record has been updated. 
&lt;BR /&gt;If key doesn't exist, the record is new. 
&lt;BR /&gt;If you need to detect deleted records, you need an other subjob where you main row becomes the lookup, then rejected records are deleted ones. 
&lt;BR /&gt; 
&lt;BR /&gt;This link may help you 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCqWfCAK" target="_blank"&gt;https://community.talend.com/t5/Design-and-Development/How-to-generate-MD5-hash-value/td-p/43927&lt;/A&gt; 
&lt;BR /&gt;</description>
      <pubDate>Sun, 27 May 2018 09:57:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-Update-and-delete-in-destination-file/m-p/2348330#M115473</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-05-27T09:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Insert Update and delete in destination file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-Update-and-delete-in-destination-file/m-p/2348331#M115474</link>
      <description>&lt;P&gt;Thanks for your quick reply,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But is there any other way to do other than writing a routine ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;</description>
      <pubDate>Sun, 27 May 2018 10:31:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-Update-and-delete-in-destination-file/m-p/2348331#M115474</guid>
      <dc:creator>MaheswarReddy</dc:creator>
      <dc:date>2018-05-27T10:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Insert Update and delete in destination file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-Update-and-delete-in-destination-file/m-p/2348332#M115475</link>
      <description>&lt;P&gt;You can also join each main row field to the corresponding one in the lookup.&lt;/P&gt;&lt;P&gt;You need 2 steps:&lt;/P&gt;&lt;P&gt;1- does the record exist in the previous file?&lt;/P&gt;&lt;P&gt;2- no, this is a new record. yes, have a 2nd tMap with all fields joined to each other to get changed records.&lt;/P&gt;</description>
      <pubDate>Sun, 27 May 2018 10:47:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-Update-and-delete-in-destination-file/m-p/2348332#M115475</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-05-27T10:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Insert Update and delete in destination file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Insert-Update-and-delete-in-destination-file/m-p/2348333#M115476</link>
      <description>&lt;P&gt;Hello TRF,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please explain how to 'update' or 'delete' record in a flat file target.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example&lt;/P&gt;
&lt;P&gt;Data in Src_file :&lt;/P&gt;
&lt;P&gt;col1,col2,col3&lt;/P&gt;
&lt;P&gt;1,john,employee&lt;/P&gt;
&lt;P&gt;2,mary,retired&lt;/P&gt;
&lt;P&gt;3,sam,joining&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data in Tgt File(Active employees only):&lt;/P&gt;
&lt;P&gt;empno.empname&lt;/P&gt;
&lt;P&gt;1,john&lt;/P&gt;
&lt;P&gt;2,mary&lt;/P&gt;
&lt;P&gt;3,sam&lt;/P&gt;
&lt;P&gt;4,Hary&lt;/P&gt;
&lt;P&gt;5, Phil&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now that Mary has retired, i need to delete row#2, can you please help&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 18:44:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Insert-Update-and-delete-in-destination-file/m-p/2348333#M115476</guid>
      <dc:creator>tnewbie</dc:creator>
      <dc:date>2019-06-05T18:44:13Z</dc:date>
    </item>
  </channel>
</rss>

