<?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 differentiate Insert vs Update in tmap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/how-differentiate-Insert-vs-Update-in-tmap/m-p/2226777#M18586</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If you're using Oracle, then I believe that's one of the DB types where Talend correctly renders the INSERT OR UPDATE command, based on you setting the Key columns of your data correctly.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jul 2020 15:34:06 GMT</pubDate>
    <dc:creator>David_Beaty</dc:creator>
    <dc:date>2020-07-09T15:34:06Z</dc:date>
    <item>
      <title>how differentiate Insert vs Update in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-differentiate-Insert-vs-Update-in-tmap/m-p/2226770#M18579</link>
      <description>&lt;P&gt;I am doing update/insert load and I would like to populate different columns in tmap - depend of if Talend is doing insert or update.&lt;/P&gt; 
&lt;P&gt;for example - populate created timestamp column if it it insert&lt;/P&gt; 
&lt;P&gt;or populate last modified timestamp column if it is update.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;how to differentiate these 2 actions in tmap.&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>Fri, 19 Jun 2020 22:49:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-differentiate-Insert-vs-Update-in-tmap/m-p/2226770#M18579</guid>
      <dc:creator>sradovan</dc:creator>
      <dc:date>2020-06-19T22:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: how differentiate Insert vs Update in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-differentiate-Insert-vs-Update-in-tmap/m-p/2226771#M18580</link>
      <description>How do you decide to insert or update when arriving at the database component?
&lt;BR /&gt;Do you have a single component for both operations?
&lt;BR /&gt;In this case, is it able to ignore null values (do nothing with them) if any?</description>
      <pubDate>Sat, 20 Jun 2020 05:26:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-differentiate-Insert-vs-Update-in-tmap/m-p/2226771#M18580</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2020-06-20T05:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: how differentiate Insert vs Update in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-differentiate-Insert-vs-Update-in-tmap/m-p/2226772#M18581</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I've often found with Talend that its quicker to ascertain as part of your job the INSERTs and UPDATEs before you go to any form of output component (load up the unique key columns into a temporary table and then inner join this against you insert/update table). This way you can split the tDBOutput into either INSERT or UPDATE within the component. Rather than using the components "INSERT or UPDATE" option, for some DB types it performs this as a single row SELECT FROM and then either an INSERT or UPDATE - which is very slow.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 11:16:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-differentiate-Insert-vs-Update-in-tmap/m-p/2226772#M18581</guid>
      <dc:creator>David_Beaty</dc:creator>
      <dc:date>2020-06-22T11:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: how differentiate Insert vs Update in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-differentiate-Insert-vs-Update-in-tmap/m-p/2226773#M18582</link>
      <description>&lt;P&gt;I was using single component Update/Insert&lt;/P&gt; 
&lt;P&gt;and last_modified_timestamp can be null.&lt;/P&gt; 
&lt;P&gt;I was looking if Talend has global variable for operation because Talend process knows if it's doing Update or Insert and therefore I was looking for something like this&lt;/P&gt; 
&lt;P&gt;if Insert then&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; created_timestamp = ....&lt;/P&gt; 
&lt;P&gt;Else if update&amp;nbsp; then &amp;nbsp;&amp;nbsp; /* or just Else */&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; last_modified_timestamp = ....&lt;/P&gt; 
&lt;P&gt;end if;&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; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 16:12:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-differentiate-Insert-vs-Update-in-tmap/m-p/2226773#M18582</guid>
      <dc:creator>sradovan</dc:creator>
      <dc:date>2020-06-22T16:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: how differentiate Insert vs Update in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-differentiate-Insert-vs-Update-in-tmap/m-p/2226774#M18583</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, if you're doing an INSERT/UPDATE or UPDATE/INSERT, Talend will do a select on what are defined as the key columns, so see if a row exists and then go down the INSERT or UPDATE route accordingly, on a row by row basis. I think for Oracle, its clever enough to ship this logic to the DB so its quick, but for other DB types it has to do it row by row.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try adjusting the logic to:&lt;/P&gt;
&lt;OL&gt;
 &lt;LI&gt;Create a temp table&lt;/LI&gt;
 &lt;LI&gt;Load the update keys only to temp table from the source.&lt;/LI&gt;
 &lt;LI&gt;Inner join the temp table to the destination table as a tDBInput.&lt;/LI&gt;
 &lt;LI&gt;Feed the flow from the above step into a tMap and inner join in the source on the update columns.&lt;/LI&gt;
 &lt;LI&gt;Any successful joins need to go to a DB component that UPDATEs.&lt;/LI&gt;
 &lt;LI&gt;Any inner join rejects need to go to a DB components that INSERTs.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 08:55:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-differentiate-Insert-vs-Update-in-tmap/m-p/2226774#M18583</guid>
      <dc:creator>David_Beaty</dc:creator>
      <dc:date>2020-06-24T08:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: how differentiate Insert vs Update in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-differentiate-Insert-vs-Update-in-tmap/m-p/2226775#M18584</link>
      <description>&lt;P&gt;Thank you for the update. I understand that I can use oracle triggers as well WHEN inserting vs WHEN updating,&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;however, I really was looking for solution where I don't need to create extra table just to understand which operation Talend is doing. Talend already know based on query, vs Key column, if it will be update or insert operation and I was looking for to see if that knowledge is also store in any of global variables that can be used in tmap.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Again, thank you for your comment.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 16:37:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-differentiate-Insert-vs-Update-in-tmap/m-p/2226775#M18584</guid>
      <dc:creator>sradovan</dc:creator>
      <dc:date>2020-06-24T16:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: how differentiate Insert vs Update in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-differentiate-Insert-vs-Update-in-tmap/m-p/2226776#M18585</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If you're using Oracle, then I believe that's one of the DB types where Talend correctly renders the INSERT OR UPDATE command, based on you setting the Key columns of your data correctly.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 15:34:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-differentiate-Insert-vs-Update-in-tmap/m-p/2226776#M18585</guid>
      <dc:creator>David_Beaty</dc:creator>
      <dc:date>2020-07-09T15:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: how differentiate Insert vs Update in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-differentiate-Insert-vs-Update-in-tmap/m-p/2226777#M18586</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If you're using Oracle, then I believe that's one of the DB types where Talend correctly renders the INSERT OR UPDATE command, based on you setting the Key columns of your data correctly.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 15:34:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-differentiate-Insert-vs-Update-in-tmap/m-p/2226777#M18586</guid>
      <dc:creator>David_Beaty</dc:creator>
      <dc:date>2020-07-09T15:34:06Z</dc:date>
    </item>
  </channel>
</rss>

