<?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: action on date : Update or insert adds all the rows to mySQL table in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/action-on-date-Update-or-insert-adds-all-the-rows-to-mySQL-table/m-p/2201679#M3681</link>
    <description>hi,&lt;BR /&gt;are you using auto-increment for the table's Id ?&lt;BR /&gt;regards</description>
    <pubDate>Thu, 17 Sep 2015 16:03:20 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-09-17T16:03:20Z</dc:date>
    <item>
      <title>action on date : Update or insert adds all the rows to mySQL table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/action-on-date-Update-or-insert-adds-all-the-rows-to-mySQL-table/m-p/2201678#M3680</link>
      <description>When you use databases , probably you may want to insert new rows and update existing ones right? 
&lt;BR /&gt;Insert, insert/update, update/insert it doesn't matter, whenever I run the job it adds all the records again to the database. 
&lt;BR /&gt;How can i solve this issue? 
&lt;BR /&gt;MySQL table :&amp;nbsp; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBeY.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130065i7BEE3E483A4D8D08/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBeY.jpg" alt="0683p000009MBeY.jpg" /&gt;&lt;/span&gt;Talend: insert/update&amp;nbsp; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MAx1.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141253iB5E22ADA799E81B5/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MAx1.jpg" alt="0683p000009MAx1.jpg" /&gt;&lt;/span&gt; 
&lt;BR /&gt;Talend : Advanced Settings 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBed.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/129774i0DDE243A06D05346/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBed.jpg" alt="0683p000009MBed.jpg" /&gt;&lt;/span&gt;MySQL duplicated data :&amp;nbsp; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBei.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/146180i8935051FD63CCA57/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBei.jpg" alt="0683p000009MBei.jpg" /&gt;&lt;/span&gt;Best Regards 
&lt;BR /&gt;Cihan</description>
      <pubDate>Thu, 17 Sep 2015 11:41:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/action-on-date-Update-or-insert-adds-all-the-rows-to-mySQL-table/m-p/2201678#M3680</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-17T11:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: action on date : Update or insert adds all the rows to mySQL table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/action-on-date-Update-or-insert-adds-all-the-rows-to-mySQL-table/m-p/2201679#M3681</link>
      <description>hi,&lt;BR /&gt;are you using auto-increment for the table's Id ?&lt;BR /&gt;regards</description>
      <pubDate>Thu, 17 Sep 2015 16:03:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/action-on-date-Update-or-insert-adds-all-the-rows-to-mySQL-table/m-p/2201679#M3681</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-17T16:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: action on date : Update or insert adds all the rows to mySQL table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/action-on-date-Update-or-insert-adds-all-the-rows-to-mySQL-table/m-p/2201680#M3682</link>
      <description>YES at msSQL Is identiy &amp;gt; Yes , Identity increment &amp;gt; 1
&lt;BR /&gt;Please help, I have 30 tables, Each day i am deleting every table's data manually and running the talend jobs again not to have duplicated data.
&lt;BR /&gt;Regards
&lt;BR /&gt;Cihan</description>
      <pubDate>Mon, 21 Sep 2015 07:21:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/action-on-date-Update-or-insert-adds-all-the-rows-to-mySQL-table/m-p/2201680#M3682</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-21T07:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: action on date : Update or insert adds all the rows to mySQL table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/action-on-date-Update-or-insert-adds-all-the-rows-to-mySQL-table/m-p/2201681#M3683</link>
      <description>if you're using auto-increment, do not map that&amp;nbsp; key in Talend. 
&lt;BR /&gt;have a look at that post about that : 
&lt;BR /&gt; 
&lt;A href="http://bekwam.blogspot.fr/2011/05/mapping-auto-increment-column-in-talend.html" rel="nofollow noopener noreferrer"&gt;http://bekwam.blogspot.fr/2011/05/mapping-auto-increment-column-in-talend.html&lt;/A&gt; 
&lt;BR /&gt;But ... 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; , if you haven't got a key, you cannot update data ... So do not use 'insert or update' option, but use 2 différents flows. 
&lt;BR /&gt;one for new data =&amp;gt; insert option on table 
&lt;BR /&gt;one for update data =&amp;gt; update option on table 
&lt;BR /&gt;it's a better way 'cause update or insert (&amp;amp; reverse) are full scan. 
&lt;BR /&gt;For that purpose, use a tmap with your data input, a lookup to retrieve all id already in your table (if it's a very huge table use option reload at each row with the globalmap trick in the xherre clause). 
&lt;BR /&gt;join input &amp;amp; lookup flow (inner join) 
&lt;BR /&gt;first output for update , second output for create (insert) using the tmap option 'catch lookup inner join reject' (that mean no id matche so it's a new row) 
&lt;BR /&gt;that's it 
&lt;BR /&gt;hope it help 
&lt;BR /&gt;regards 
&lt;BR /&gt;laurent</description>
      <pubDate>Wed, 23 Sep 2015 11:38:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/action-on-date-Update-or-insert-adds-all-the-rows-to-mySQL-table/m-p/2201681#M3683</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-23T11:38:08Z</dc:date>
    </item>
  </channel>
</rss>

