<?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: Know if a row is inserted into a database or updates a row of that database in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Know-if-a-row-is-inserted-into-a-database-or-updates-a-row-of/m-p/2312756#M83673</link>
    <description>&lt;P&gt;Thank you MShakir, NB_LINE_INSERTED / UPDATED / DELETED are AFTER component global var. Not sure they are available if the whole stream of data is not finished. They are integers, not related to the data, to be able to retrieve IDs and other columns.&lt;/P&gt;</description>
    <pubDate>Sat, 12 Dec 2020 01:28:53 GMT</pubDate>
    <dc:creator>Alpha549</dc:creator>
    <dc:date>2020-12-12T01:28:53Z</dc:date>
    <item>
      <title>Know if a row is inserted into a database or updates a row of that database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Know-if-a-row-is-inserted-into-a-database-or-updates-a-row-of/m-p/2312753#M83670</link>
      <description>&lt;P&gt;Hello world !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using a tOracleOutput set on Update or Insert.&lt;/P&gt;&lt;P&gt;I would like to know if a row is actually inserted into the database, or if it updates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've thought about a solution : check first if this row is in the targeted table making an inner join and getting rejected = this row will be inserted, else it's an update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I would like to know there is a built-in method to know that ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance ! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 15:50:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Know-if-a-row-is-inserted-into-a-database-or-updates-a-row-of/m-p/2312753#M83670</guid>
      <dc:creator>Alpha549</dc:creator>
      <dc:date>2020-12-11T15:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Know if a row is inserted into a database or updates a row of that database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Know-if-a-row-is-inserted-into-a-database-or-updates-a-row-of/m-p/2312754#M83671</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I am exploring TOS since a week...&lt;/P&gt;&lt;P&gt;Hope this code helps...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[1] Put below code in tJava component code:&lt;/P&gt;&lt;P&gt;System.out.println("Inserts: " + ((Integer)globalMap.get("tDBOutput_1_NB_LINE_INSERTED")));&lt;/P&gt;&lt;P&gt;System.out.println("Updates: " + ((Integer)globalMap.get("tDBOutput_1_NB_LINE_UPDATED")));&lt;/P&gt;&lt;P&gt;System.out.println("Deletes: " + ((Integer)globalMap.get("tDBOutput_1_NB_LINE_DELETED")));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[2] DBOutput (Trigger) On Component Ok -  Link to tJava_1 component&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 16:11:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Know-if-a-row-is-inserted-into-a-database-or-updates-a-row-of/m-p/2312754#M83671</guid>
      <dc:creator>MShakir</dc:creator>
      <dc:date>2020-12-11T16:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Know if a row is inserted into a database or updates a row of that database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Know-if-a-row-is-inserted-into-a-database-or-updates-a-row-of/m-p/2312755#M83672</link>
      <description>&lt;P&gt;Thanks for the quick response, it's super helpful.&lt;/P&gt;&lt;P&gt;But if I want to have this output format (with data from my columns):&lt;/P&gt;&lt;P&gt;INSERT: id1, XXX, XXX&lt;/P&gt;&lt;P&gt;INSERT: id2, XXX, XXX&lt;/P&gt;&lt;P&gt;UPDATE: id3, XXX, XXX&lt;/P&gt;&lt;P&gt;INSERT: id4, XXX, XXX&lt;/P&gt;&lt;P&gt;UPDATE: id5, XXX, XXX&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to adapt the Java code in the T_Java?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 16:38:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Know-if-a-row-is-inserted-into-a-database-or-updates-a-row-of/m-p/2312755#M83672</guid>
      <dc:creator>Monster971</dc:creator>
      <dc:date>2020-12-11T16:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Know if a row is inserted into a database or updates a row of that database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Know-if-a-row-is-inserted-into-a-database-or-updates-a-row-of/m-p/2312756#M83673</link>
      <description>&lt;P&gt;Thank you MShakir, NB_LINE_INSERTED / UPDATED / DELETED are AFTER component global var. Not sure they are available if the whole stream of data is not finished. They are integers, not related to the data, to be able to retrieve IDs and other columns.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Dec 2020 01:28:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Know-if-a-row-is-inserted-into-a-database-or-updates-a-row-of/m-p/2312756#M83673</guid>
      <dc:creator>Alpha549</dc:creator>
      <dc:date>2020-12-12T01:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: Know if a row is inserted into a database or updates a row of that database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Know-if-a-row-is-inserted-into-a-database-or-updates-a-row-of/m-p/2312757#M83674</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Yes, even I could't find any component with such functionality.&lt;/P&gt;&lt;P&gt;Go by your proposed solution, it works...&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>Sat, 12 Dec 2020 09:58:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Know-if-a-row-is-inserted-into-a-database-or-updates-a-row-of/m-p/2312757#M83674</guid>
      <dc:creator>MShakir</dc:creator>
      <dc:date>2020-12-12T09:58:03Z</dc:date>
    </item>
  </channel>
</rss>

