<?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: [resolved] 2 tables to 1 by tMap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319490#M89728</link>
    <description>Hi,
&lt;BR /&gt;You can use&amp;nbsp;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;ternary operator for if-else scenario in tMap or join your two tables.&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;The expression looks &amp;nbsp;like:&lt;/FONT&gt;&lt;/FONT&gt;
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;FONT size="1"&gt;Condition?value if true:value if false&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;FONT size="1"&gt;Best regards&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;FONT size="1"&gt;Sabrina&lt;/FONT&gt;&lt;/FONT&gt;</description>
    <pubDate>Wed, 22 Mar 2017 07:59:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-03-22T07:59:15Z</dc:date>
    <item>
      <title>[resolved] 2 tables to 1 by tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319489#M89727</link>
      <description>Hi All, I have 3 tables: transaction, details, backup. 
&lt;BR /&gt;I would like to check: 
&lt;BR /&gt;IF&amp;nbsp;(ID in transaction is equal to the ID in details) 
&lt;BR /&gt;the address in details table will be imported to the backup 
&lt;BR /&gt;ELSE 
&lt;BR /&gt;null; 
&lt;BR /&gt;How do I do that ? 
&lt;BR /&gt;My table is currently join together by transaction --&amp;gt; tMap --&amp;gt; Backup</description>
      <pubDate>Wed, 22 Mar 2017 06:58:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319489#M89727</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-22T06:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] 2 tables to 1 by tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319490#M89728</link>
      <description>Hi,
&lt;BR /&gt;You can use&amp;nbsp;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;ternary operator for if-else scenario in tMap or join your two tables.&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;The expression looks &amp;nbsp;like:&lt;/FONT&gt;&lt;/FONT&gt;
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;FONT size="1"&gt;Condition?value if true:value if false&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;FONT size="1"&gt;Best regards&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;&lt;FONT size="1"&gt;Sabrina&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Wed, 22 Mar 2017 07:59:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319490#M89728</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-22T07:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] 2 tables to 1 by tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319491#M89729</link>
      <description>Hi, 
&lt;BR /&gt;Use Transaction as the main flow for the tMap and Details as the lookup. 
&lt;BR /&gt;Join both tables in the tMap using the ID column and a Left Outer Join. 
&lt;BR /&gt;On Backup flow, populate all columns from Transaction but address from Details. 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDmx.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154446i2441A9C3FF9BFFA9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDmx.png" alt="0683p000009MDmx.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;Regards, 
&lt;BR /&gt;TRF</description>
      <pubDate>Wed, 22 Mar 2017 08:03:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319491#M89729</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-03-22T08:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] 2 tables to 1 by tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319492#M89730</link>
      <description>Hello TRF, how do I do a left outer join?</description>
      <pubDate>Wed, 22 Mar 2017 08:45:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319492#M89730</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-22T08:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] 2 tables to 1 by tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319493#M89731</link>
      <description>Hello xdshi, I tried this method also but it didn't work.
&lt;BR /&gt;I have 40 rows in transaction and 5998 rows in details. After I connect the transaction as main and details as lookup to the tmap, the output becomes 239920 rows. I wanted only 40 rows of data for the output. Please help.</description>
      <pubDate>Wed, 22 Mar 2017 08:51:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319493#M89731</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-22T08:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] 2 tables to 1 by tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319494#M89732</link>
      <description>This is the default. See the line "Join Model" on the capture.</description>
      <pubDate>Wed, 22 Mar 2017 08:51:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319494#M89732</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-03-22T08:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] 2 tables to 1 by tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319495#M89733</link>
      <description>@TRF, I have 40 rows in transaction and 5998 rows in details. After I connect the transaction as main and details as lookup to the tMap, the output becomes 239920 rows. I wanted only 40 rows of data for the output. Please help.</description>
      <pubDate>Wed, 22 Mar 2017 08:58:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319495#M89733</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-22T08:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] 2 tables to 1 by tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319496#M89734</link>
      <description>Drap and drop ID from Transaction to Details to establish the join or you'll get a cartesian product</description>
      <pubDate>Wed, 22 Mar 2017 09:09:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319496#M89734</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-03-22T09:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] 2 tables to 1 by tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319497#M89735</link>
      <description>@TRF, oh! However, I have ID1 and ID2 in Transaction and only ID in Details. How do I establish the join?
&lt;BR /&gt;The backup table also have ID1 and ID2.
&lt;BR /&gt;Details of ID1 and ID2 can be extracted from ID in details.
&lt;BR /&gt;I tried adding row1.ID1 + row4.ID2 into the expression for ID.
&lt;BR /&gt;However I receive&amp;nbsp;this error message:
&lt;BR /&gt;Exception in component tMap_1
&lt;BR /&gt;java.lang.NullPointerException</description>
      <pubDate>Wed, 22 Mar 2017 09:25:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319497#M89735</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-22T09:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] 2 tables to 1 by tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319498#M89736</link>
      <description>Give an example (with sample data) to your data in and expected result</description>
      <pubDate>Wed, 22 Mar 2017 09:42:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319498#M89736</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-03-22T09:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] 2 tables to 1 by tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319499#M89737</link>
      <description>@TRF I think your solution works. It's just that my ID1 and ID2 have NULL values for some rows and thus the following error message appears:
&lt;BR /&gt;Exception in component tMap_1
&lt;BR /&gt;java.lang.NullPointerException
&lt;BR /&gt;I'm putting 
&lt;B&gt;row1.ID1 + row4.ID2&lt;/B&gt; as the expression&amp;nbsp;for ID to establish&amp;nbsp;the join. How do I take care of the NULL value?</description>
      <pubDate>Wed, 22 Mar 2017 09:51:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319499#M89737</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-22T09:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] 2 tables to 1 by tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319500#M89738</link>
      <description>Click on&amp;nbsp; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDdx.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/129830i629C6208DCD22E91/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDdx.png" alt="0683p000009MDdx.png" /&gt;&lt;/span&gt;&amp;nbsp;on top of each flow in tMap to add the filters like this: 
&lt;BR /&gt; 
&lt;PRE&gt;row1.ID1 != null&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Mar 2017 10:00:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319500#M89738</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-03-22T10:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] 2 tables to 1 by tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319501#M89739</link>
      <description>@TRF, I have tried adding filters where &lt;B&gt;output.ID != null&lt;/B&gt;. However, received the following error message:&lt;BR /&gt;Detail Message: The operator != is undefined for the argument type(s) int, null&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;First transaction --&amp;gt; ID1: 123456 ID2: 789012&lt;BR /&gt;Second transaction --&amp;gt; ID1: 456789 ID2: 012345&lt;BR /&gt;&lt;BR /&gt;Details table&lt;BR /&gt;123456&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 18-11-1980&lt;BR /&gt;789012&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;19-12-1990&lt;BR /&gt;456789&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12-01-1985&lt;BR /&gt;012345&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;20-02-1975</description>
      <pubDate>Thu, 23 Mar 2017 00:56:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319501#M89739</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-23T00:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] 2 tables to 1 by tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319502#M89740</link>
      <description>Your column output.ID is of type int. This is a primitive type and therefore cannot be null. You will see in your table schema a tick box specifying that a column can be nullable. Tick that. It will change your column type from int to the class Integer. An object of class Integer can be null. This should enable the code suggested by TRF.</description>
      <pubDate>Thu, 23 Mar 2017 01:02:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319502#M89740</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-23T01:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] 2 tables to 1 by tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319503#M89741</link>
      <description>@rhall_2.0 Hello, I have tried to tick the nullable but a new error appears as follow: 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Detail Message: The operator + is undefined for the argument type(s) null, Short 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;I currently have row1.ID1 + row4.ID2 in the expression for ID in tMap to prevent a Cartesian product for the join. 
&lt;BR /&gt;ID1 and ID2 is in type Short while ID is in type Integer. 
&lt;BR /&gt; 
&lt;BR /&gt;I also activated filter at row1 : row1.ID1 != null + row1.ID2 != null 
&lt;BR /&gt;I activated filter at the output: row4.ID != null</description>
      <pubDate>Thu, 23 Mar 2017 01:15:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319503#M89741</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-23T01:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] 2 tables to 1 by tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319504#M89742</link>
      <description>OK. This seems to show that ticking the nullable tick box fixed that issue. This is a new one &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;Can you take a screenshot of your tMap with the column configurations in view? I would guess that your ID2 column is a short (also a primitive type) and also needs to have the nullable tick box ticked.</description>
      <pubDate>Thu, 23 Mar 2017 01:32:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319504#M89742</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-23T01:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] 2 tables to 1 by tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319505#M89743</link>
      <description>Actually, I've just re-read your error. Try this if my first suggestion doesn't work (....I don't think it will)....&lt;BR /&gt;&lt;PRE&gt;(row1.ID1!=null ? row1.ID1 : 0) + (row4.ID2!=null ? row4.ID2 : 0)&lt;/PRE&gt;&lt;BR /&gt;The above will add the value of ID1 (if it is not null, or 0 if it is null) to the value of ID2 (if it is not null, or 0 if it is null). That should get round your issue.&amp;nbsp;</description>
      <pubDate>Thu, 23 Mar 2017 01:44:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319505#M89743</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-23T01:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] 2 tables to 1 by tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319506#M89744</link>
      <description>@rhall_2.0, Hello. Thanks for the help. It works totally! Thanks for the solution!</description>
      <pubDate>Thu, 23 Mar 2017 02:20:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-2-tables-to-1-by-tMap/m-p/2319506#M89744</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-23T02:20:07Z</dc:date>
    </item>
  </channel>
</rss>

