<?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: tMap - Insertion to mySQL based on composite key in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tMap-Insertion-to-mySQL-based-on-composite-key/m-p/2306807#M78308</link>
    <description>&lt;P&gt;I thought so however I am still confused about the interpretation. If I provide two key columns in the tMap (on both sides), would Talend create a temp composite key and process the records based on combination of both the keys?&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Further extending my question, what happens if I select two key columns on one side and just one key column on another. How would the system interpret?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My task is either insert or update, based on the pre-existence of the match key (which is a combination of two columns)&lt;/P&gt;</description>
    <pubDate>Thu, 16 Aug 2018 14:52:14 GMT</pubDate>
    <dc:creator>sushantV</dc:creator>
    <dc:date>2018-08-16T14:52:14Z</dc:date>
    <item>
      <title>tMap - Insertion to mySQL based on composite key</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-Insertion-to-mySQL-based-on-composite-key/m-p/2306805#M78306</link>
      <description>&lt;P&gt;I need to read data from a raw file and insert into a MySQL table. However, my target table is unique only at combination of two fields. I do not have the option to create a composite key in the target table.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Is there a way I can do the update or insert, based on this key combination? Essentially I am trying to understand how the multilevel key mapping happens in the tMap component.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 16:25:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-Insertion-to-mySQL-based-on-composite-key/m-p/2306805#M78306</guid>
      <dc:creator>sushantV</dc:creator>
      <dc:date>2018-08-15T16:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: tMap - Insertion to mySQL based on composite key</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-Insertion-to-mySQL-based-on-composite-key/m-p/2306806#M78307</link>
      <description>&lt;P&gt;Hi sushantV,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;in tMap, on the output panel you can define multiple columns to be key columns.&lt;/P&gt; 
&lt;P&gt;For example:&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="tmap_output_composite_key.jpg" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LzR1.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141083i2E648BC416A9F578/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LzR1.jpg" alt="0683p000009LzR1.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&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;</description>
      <pubDate>Thu, 16 Aug 2018 10:16:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-Insertion-to-mySQL-based-on-composite-key/m-p/2306806#M78307</guid>
      <dc:creator>ThWabi</dc:creator>
      <dc:date>2018-08-16T10:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: tMap - Insertion to mySQL based on composite key</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-Insertion-to-mySQL-based-on-composite-key/m-p/2306807#M78308</link>
      <description>&lt;P&gt;I thought so however I am still confused about the interpretation. If I provide two key columns in the tMap (on both sides), would Talend create a temp composite key and process the records based on combination of both the keys?&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Further extending my question, what happens if I select two key columns on one side and just one key column on another. How would the system interpret?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My task is either insert or update, based on the pre-existence of the match key (which is a combination of two columns)&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 14:52:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-Insertion-to-mySQL-based-on-composite-key/m-p/2306807#M78308</guid>
      <dc:creator>sushantV</dc:creator>
      <dc:date>2018-08-16T14:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: tMap - Insertion to mySQL based on composite key</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMap-Insertion-to-mySQL-based-on-composite-key/m-p/2306808#M78309</link>
      <description>&lt;P&gt;Hi sushantV,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I think the Key columns are only used for SQL update or delete statements.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;For an insert, Talend generates an SQL statement like&amp;nbsp;&lt;PRE&gt;insert into mytable (customer_name, country, value) values ('Smith', 'Germany', 123);&lt;/PRE&gt;If customer_name and country are defined as the primary keys in the database table, the database will make sure that the combination of 'Smith' and 'Germany' is unique.&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;UL&gt; 
 &lt;LI&gt;For an update, Talend generates an SQL statement like&lt;PRE&gt;update mytable set value = 123 where customer_name = 'Smith' and country = 'Germany'&lt;/PRE&gt;The Key columns are used in the where clause (to uniquely determine which row should be updated).&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;A href="https://community.qlik.com/s/profile/0053p000007LOZqAAO"&gt;@sushantV&lt;/A&gt;&amp;nbsp;wrote: 
 &lt;BR /&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;[...] what happens if I select two key columns on one side and just one key column on another.&amp;nbsp;&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;It depends on how you (want to) connect the input side to the output side. You can calculate one unique key for the output panel from the two keys on your input panel.&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>Tue, 21 Aug 2018 09:36:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMap-Insertion-to-mySQL-based-on-composite-key/m-p/2306808#M78309</guid>
      <dc:creator>ThWabi</dc:creator>
      <dc:date>2018-08-21T09:36:04Z</dc:date>
    </item>
  </channel>
</rss>

