<?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: Using contains logic in tMap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Using-contains-logic-in-tMap/m-p/2270363#M48302</link>
    <description>&lt;P&gt;A Talend resource told me this would work but it's not working. Actually a string.equals(string) does not work perform a match either. Is this a bug in Talend? How else are you supposed to do contains logic between main flow and a lookup?&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-inline" image-alt="Capture.PNG" style="width: 335px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MaDO.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157036i25A6979CBD0ACB78/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MaDO.png" alt="0683p000009MaDO.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 22 May 2020 23:14:58 GMT</pubDate>
    <dc:creator>jimbo20814</dc:creator>
    <dc:date>2020-05-22T23:14:58Z</dc:date>
    <item>
      <title>Using contains logic in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-contains-logic-in-tMap/m-p/2270361#M48300</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello, I’m unable to perform a join in tMap using contains logic. I need to be able to do a JOIN using contains logic, not exact match. So if mainflow column string is contained within lookup column string, then perform a JOIN. I tried so many different ways but unable to make it work. Does anyone have experience with this?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:21:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-contains-logic-in-tMap/m-p/2270361#M48300</guid>
      <dc:creator>jimbo20814</dc:creator>
      <dc:date>2024-11-16T02:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using contains logic in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-contains-logic-in-tMap/m-p/2270362#M48301</link>
      <description>&lt;P&gt;To further elaborate..&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Okay so basically the main flow has a long URL i.e. “dev.sapience.azure.portal.com/abc/123/bblahblah.aspx?param=bac”. Then in a lookup we have a list of configured URLs but shorter, for example, “azure.portal.com”. See how the lookup value URL is contained within the main flow URL? It’s not an exact match obviously but mainFlow.URL.contains(lookup.URL) == true. So the lookup has some integer ID associated to “azure.portal.com”. I want to perform a JOIN based on contains logic so I can get the lookup ID. Does this make sense?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I tried so many ways to make this work, spending hours fiddling but nothing I tried worked!&lt;/P&gt;</description>
      <pubDate>Fri, 22 May 2020 18:21:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-contains-logic-in-tMap/m-p/2270362#M48301</guid>
      <dc:creator>jimbo20814</dc:creator>
      <dc:date>2020-05-22T18:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using contains logic in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-contains-logic-in-tMap/m-p/2270363#M48302</link>
      <description>&lt;P&gt;A Talend resource told me this would work but it's not working. Actually a string.equals(string) does not work perform a match either. Is this a bug in Talend? How else are you supposed to do contains logic between main flow and a lookup?&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-inline" image-alt="Capture.PNG" style="width: 335px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MaDO.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157036i25A6979CBD0ACB78/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MaDO.png" alt="0683p000009MaDO.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 May 2020 23:14:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-contains-logic-in-tMap/m-p/2270363#M48302</guid>
      <dc:creator>jimbo20814</dc:creator>
      <dc:date>2020-05-22T23:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using contains logic in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-contains-logic-in-tMap/m-p/2270364#M48303</link>
      <description>&lt;P&gt;Note, when I do a a normal join in tMap (connecting lines) it performs the match. But when I do the .contains or .equals, no match.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 May 2020 23:17:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-contains-logic-in-tMap/m-p/2270364#M48303</guid>
      <dc:creator>jimbo20814</dc:creator>
      <dc:date>2020-05-22T23:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using contains logic in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-contains-logic-in-tMap/m-p/2270365#M48304</link>
      <description>&lt;P&gt;Guys, when I removed the normal join (connecting lines) on CompanyID and did it in the expression, it worked. I guess you can't combine normal JOINS with expressions?&lt;/P&gt;</description>
      <pubDate>Sat, 23 May 2020 00:13:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-contains-logic-in-tMap/m-p/2270365#M48304</guid>
      <dc:creator>jimbo20814</dc:creator>
      <dc:date>2020-05-23T00:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using contains logic in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-contains-logic-in-tMap/m-p/2270366#M48305</link>
      <description>&lt;P&gt;Here a solution to your case.&lt;/P&gt; 
&lt;P&gt;1rst of all, the whole job design:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="test.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MaEV.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142326i16FD38C11A9168E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MaEV.png" alt="0683p000009MaEV.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Here, I use tFixedFlowInput for both main and lookup input (as this is just a test job).&lt;/P&gt; 
&lt;P&gt;The main change from what you've tried is in tMap_1 where the &lt;STRONG&gt;Lookup Model&lt;/STRONG&gt; is set to "&lt;STRONG&gt;Reload at each row&lt;/STRONG&gt;" instead of "Load once".&amp;nbsp; This means that for each row from the main flow, the lookup table (here represented by the tFixedFlowInput_2 component) is accessed. As this data source is fix (it is not possible to have a where clause on it), I add a 2nd tMap component to filter on desired records.&lt;/P&gt; 
&lt;P&gt;Here is what the tMap_1 component looks like:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="test.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MaEf.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158177i41F75F93EFFBDEDA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MaEf.png" alt="0683p000009MaEf.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;As you can see, when you set&amp;nbsp;&lt;STRONG&gt;Lookup Model&lt;/STRONG&gt;&amp;nbsp;to "&lt;STRONG&gt;Reload at each row&lt;/STRONG&gt;" you have to define a global variable for each field from the main flow you want to use to filter on the lookup flow. Here, I define a global variable called "shortURL" which is populated from the corresponding main flow field.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Then, each time a new row arrives from the main flow, the&amp;nbsp;"shortURL"&amp;nbsp;global variable changes and the lookup flow restarts. Each row from the lookup flow comes to the 2nd tMap where it is filtered with the desired logic. Here it is:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="test.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Ma3s.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153276i742554A05638339B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Ma3s.png" alt="0683p000009Ma3s.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;The tMap_2 filter is defined with the expected&amp;nbsp;expression allowing to get only records the field called "longURL" contains the value of the "shortURL" global variable.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Finally, I have the following content for the main table:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="test.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MaEk.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141527i8073633EC267F2E5/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MaEk.png" alt="0683p000009MaEk.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;And this one for the lookup table:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="test.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MaEp.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128661i31D0C09A20111655/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MaEp.png" alt="0683p000009MaEp.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;And the result is as expected:&lt;/P&gt; 
&lt;PRE&gt;.---------+------------------+----------------------------------------------------------------.
|                                          tLogRow_1                                          |
|=--------+------------------+---------------------------------------------------------------=|
|companyId|shortURL          |longURL                                                         |
|=--------+------------------+---------------------------------------------------------------=|
|C1       |azure.portal.com  |dev.sapience.azure.portal.com/abc/123/bblahblah.aspx?param=bac  |
|C2       |zorglub.portal.com|dev.sapience.zorglub.portal.com/abc/123/bblahblah.aspx?param=bac|
'---------+------------------+----------------------------------------------------------------'&lt;/PRE&gt; 
&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Sat, 23 May 2020 12:32:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-contains-logic-in-tMap/m-p/2270366#M48305</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2020-05-23T12:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using contains logic in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-contains-logic-in-tMap/m-p/2270367#M48306</link>
      <description>&lt;P&gt;Thank you TRF!&lt;/P&gt;</description>
      <pubDate>Sun, 24 May 2020 16:26:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-contains-logic-in-tMap/m-p/2270367#M48306</guid>
      <dc:creator>jimbo20814</dc:creator>
      <dc:date>2020-05-24T16:26:59Z</dc:date>
    </item>
  </channel>
</rss>

