<?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: Left join in tmap with an 'or' condition in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Left-join-in-tmap-with-an-or-condition/m-p/2200222#M2775</link>
    <description>As soon as you don't have other choice than having 2 lookups or separated tMap, this not a bad practice (because tMap doesn't allow you to choose between "and" and "or"). 
&lt;BR /&gt;If you really want a single tMap and a single lookup, you may produce a cartesian product (tables not joined with each other) and use a filter expression for output flow: 
&lt;BR /&gt;tbl1.key1 == tbl2.key1 || tbl1.key2 == tbl2.key2 || tbl1.key3 == tbl2.key3 
&lt;BR /&gt;It should work but in my opinion this not a good design option and in case of huge volumes it may give you poor performances and possible memory issues.</description>
    <pubDate>Thu, 13 Feb 2020 07:39:01 GMT</pubDate>
    <dc:creator>TRF</dc:creator>
    <dc:date>2020-02-13T07:39:01Z</dc:date>
    <item>
      <title>Left join in tmap with an 'or' condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Left-join-in-tmap-with-an-or-condition/m-p/2200221#M2774</link>
      <description>&lt;P&gt;I have input flow with 3 key fields coming into tMap and would like to grab all records from lookup where ANY of the 3 keys match the lookup keys, and also pass all input rows to the output flow.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is similar to sql: ...select * from tbl1 left join tbl2 on (tbl1.key1 = tbl2.key1 or tbl1.key2 = tbl2.key2 or&amp;nbsp;tbl1.key3 = tbl2.key3)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can do this by using 3 lookups or 3 tMaps but this seems like bad practice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I do this using one tMap and one lookup?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:17:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Left-join-in-tmap-with-an-or-condition/m-p/2200221#M2774</guid>
      <dc:creator>EMeany</dc:creator>
      <dc:date>2024-11-16T03:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Left join in tmap with an 'or' condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Left-join-in-tmap-with-an-or-condition/m-p/2200222#M2775</link>
      <description>As soon as you don't have other choice than having 2 lookups or separated tMap, this not a bad practice (because tMap doesn't allow you to choose between "and" and "or"). 
&lt;BR /&gt;If you really want a single tMap and a single lookup, you may produce a cartesian product (tables not joined with each other) and use a filter expression for output flow: 
&lt;BR /&gt;tbl1.key1 == tbl2.key1 || tbl1.key2 == tbl2.key2 || tbl1.key3 == tbl2.key3 
&lt;BR /&gt;It should work but in my opinion this not a good design option and in case of huge volumes it may give you poor performances and possible memory issues.</description>
      <pubDate>Thu, 13 Feb 2020 07:39:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Left-join-in-tmap-with-an-or-condition/m-p/2200222#M2775</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2020-02-13T07:39:01Z</dc:date>
    </item>
  </channel>
</rss>

