<?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: Conditional Lookup in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370294#M133355</link>
    <description>Yes I am using tMap, sorry for not being clear.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Right now I am performing lookups of 3 columns&lt;BR /&gt;&lt;BR /&gt;A1.City --&amp;gt; A2.City&lt;BR /&gt;A1.Country&amp;nbsp;--&amp;gt;&amp;nbsp;A2.Country&lt;BR /&gt;A1.State&amp;nbsp;--&amp;gt;&amp;nbsp;A2.State&lt;BR /&gt;&lt;BR /&gt;What I want is in case A1.State is null, do not perform the lookup of that column&lt;BR /&gt;&lt;BR /&gt;so it will be just&lt;BR /&gt;A1.City --&amp;gt; A2.City&lt;BR /&gt;A1.Country&amp;nbsp;--&amp;gt;&amp;nbsp;A2.Country&lt;BR /&gt;Is something like this possible. Or is there other recommended way of doing it?</description>
    <pubDate>Thu, 12 May 2016 07:13:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-05-12T07:13:11Z</dc:date>
    <item>
      <title>Conditional Lookup</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370292#M133353</link>
      <description>&lt;P&gt;Main Table&lt;BR /&gt;A1.City&lt;BR /&gt;A1.Country&lt;BR /&gt;A1.State&lt;BR /&gt;&lt;BR /&gt;Lookup Table&lt;BR /&gt;A2.City&lt;BR /&gt;A2.Country&lt;BR /&gt;A2.State&lt;BR /&gt;&lt;BR /&gt;Sometimes A1 will have just city and state and country is null.&lt;BR /&gt;If I join Expr.key like this&lt;BR /&gt;A1.City A2.City&lt;BR /&gt;A1.Country A2.Country&lt;BR /&gt;A1.State A2.State&lt;BR /&gt;&lt;BR /&gt;In case A1.State is null if will not match because it performs the lookup anyways. Is there a way to not lookup a specific column based on a condition? I have tried (A1.State == Null)?"":A1.State. To no avail because now it is trying to lookup empty string.&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2016 13:13:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370292#M133353</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-11T13:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Lookup</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370293#M133354</link>
      <description>I hope you use tmap, ist not clear from your question&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="https://community.talend.com/legacyfs/online/318004/talendexample_20160511-0627.png" target="_blank"&gt;in your tmap you need to adjust the jointype for your lookup (in case of this example row5 is the lookup):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/A&gt;
&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MGr3.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149356i553EBF06C1823963/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MGr3.png" alt="0683p000009MGr3.png" /&gt;&lt;/span&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;HTH</description>
      <pubDate>Wed, 11 May 2016 14:30:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370293#M133354</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-11T14:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Lookup</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370294#M133355</link>
      <description>Yes I am using tMap, sorry for not being clear.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Right now I am performing lookups of 3 columns&lt;BR /&gt;&lt;BR /&gt;A1.City --&amp;gt; A2.City&lt;BR /&gt;A1.Country&amp;nbsp;--&amp;gt;&amp;nbsp;A2.Country&lt;BR /&gt;A1.State&amp;nbsp;--&amp;gt;&amp;nbsp;A2.State&lt;BR /&gt;&lt;BR /&gt;What I want is in case A1.State is null, do not perform the lookup of that column&lt;BR /&gt;&lt;BR /&gt;so it will be just&lt;BR /&gt;A1.City --&amp;gt; A2.City&lt;BR /&gt;A1.Country&amp;nbsp;--&amp;gt;&amp;nbsp;A2.Country&lt;BR /&gt;Is something like this possible. Or is there other recommended way of doing it?</description>
      <pubDate>Thu, 12 May 2016 07:13:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370294#M133355</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-12T07:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Lookup</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370295#M133356</link>
      <description>As djdejay says, your requirement is not clear; but it sounds like you may want a left outer join.&lt;BR /&gt;You then join on all three keys. If a row is not found in table B, you only get the data from table A.</description>
      <pubDate>Thu, 12 May 2016 07:37:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370295#M133356</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-12T07:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Lookup</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370296#M133357</link>
      <description>Lets try again, sorry I am pretty new at this. 
&lt;BR /&gt;I have 3 lookup column. 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;A href="https://community.talend.com/legacyfs/online/355770/1.png_20160512-0029.png" target="_blank"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MHHC.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138987iA3926D3A9E191F23/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MHHC.png" alt="0683p000009MHHC.png" /&gt;&lt;/span&gt; &lt;/A&gt; 
&lt;BR /&gt;Sometimes, stete_id is null, so it wont be able to find the city at all. 
&lt;BR /&gt; 
&lt;BR /&gt;In that case I want it to ignore the lookup of that column and continue to look for city. I have tried: 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;A href="https://community.talend.com/legacyfs/online/355770/2.png_20160512-0029.png" target="_blank"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MGrr.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155600i795E5C01810432CD/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MGrr.png" alt="0683p000009MGrr.png" /&gt;&lt;/span&gt; &lt;/A&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;This doesn't work because instead of null now it is looking for white space. 
&lt;BR /&gt; 
&lt;BR /&gt;This works: 
&lt;BR /&gt; 
&lt;A href="https://community.talend.com/legacyfs/online/355770/3.png_20160512-0029.png" target="_blank"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MHHG.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134926iDAEFC6D96580CEBF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MHHG.png" alt="0683p000009MHHG.png" /&gt;&lt;/span&gt; &lt;/A&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;but it will not take state into account at all. 
&lt;BR /&gt; 
&lt;BR /&gt;All I want is when state Id is null...do not perform lookup of just state_id column.</description>
      <pubDate>Thu, 12 May 2016 08:27:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370296#M133357</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-12T08:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Lookup</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370297#M133358</link>
      <description>I think you need show a clear example of your two input files and your expected output file, highlighting the rows that are an issue and their expected result.&lt;BR /&gt;It still sounds like your looking for an outer join</description>
      <pubDate>Thu, 12 May 2016 08:30:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370297#M133358</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-12T08:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Lookup</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370298#M133359</link>
      <description>uploaded image</description>
      <pubDate>Thu, 12 May 2016 08:34:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370298#M133359</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-12T08:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Lookup</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370299#M133360</link>
      <description>Try this:&lt;BR /&gt;(out2.state_id==null ? state_id : out2.state_id)&lt;BR /&gt;in this case the joincondition becomes&amp;nbsp; state_id = state_id which is always true</description>
      <pubDate>Thu, 12 May 2016 11:39:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370299#M133360</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-12T11:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Lookup</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370300#M133361</link>
      <description>I get state_id cannot be resolved to a variable.&lt;BR /&gt;I even tried&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;(out2.state_id==null ? row3.state_id : out2.state_id)&amp;nbsp;&lt;BR /&gt;Ans I still get row3 cannot be resolved to a variable.</description>
      <pubDate>Fri, 13 May 2016 11:47:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370300#M133361</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-13T11:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Lookup</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370301#M133362</link>
      <description>you should do the lookups in 2 or 3 steps (tmaps)&lt;BR /&gt;first match state, then City then ....&lt;BR /&gt;in this case your Need only 1 lookup condition and you can easily do left outer join&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;but&amp;nbsp; i am still not sure what you wanna do</description>
      <pubDate>Fri, 13 May 2016 16:48:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Conditional-Lookup/m-p/2370301#M133362</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-13T16:48:21Z</dc:date>
    </item>
  </channel>
</rss>

