<?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 Find a string in another table in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Find-a-string-in-another-table/m-p/2313599#M84439</link>
    <description>&lt;P&gt;In the middle of a flow, I need to find a string in another table, the two tables don't have any relations.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;here is a sample:&lt;/P&gt; 
&lt;P&gt;Table CustomerInfo&amp;nbsp; 100 000 rows&lt;/P&gt; 
&lt;P&gt;fields:&lt;/P&gt; 
&lt;P&gt;cust_id&lt;/P&gt; 
&lt;P&gt;cust_info&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;cust_info includes customer information like address, phone number, city, province separated by delimiters&lt;/P&gt; 
&lt;P&gt;I have a variable called &lt;STRONG&gt;prov&lt;/STRONG&gt; extracted from above with the value of the province.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Table province&amp;nbsp; 200 rows&lt;/P&gt; 
&lt;P&gt;id&lt;/P&gt; 
&lt;P&gt;name&lt;/P&gt; 
&lt;P&gt;code&lt;/P&gt; 
&lt;P&gt;country&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If the prov's value exists in the province table(province name) I want to get the province code and country.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I tried to use this solution&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCn09CAC#M92805" target="_blank" rel="noopener"&gt;https://community.talend.com/t5/Design-and-Development/Finding-keywords-in-a-tabel/m-p/151845#M92805&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I used this code in a tMap base on the solution above, but the result is a cartesian as there are not any joins between tables.&lt;/P&gt; 
&lt;P&gt;code:&lt;/P&gt; 
&lt;P&gt;row21.name.contains(row6.prov)?row21.code:""&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;row21 is lookup from&amp;nbsp;Table province and row 6 is from the main flow which I process&amp;nbsp;Table CustomerInfo&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&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-inline" image-alt="11.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M4kP.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132241i8AC737178E31CDFF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M4kP.png" alt="0683p000009M4kP.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I think I should use something like tJavaFlex and load the&amp;nbsp;Table province in the starting part and in the middle for every row of&amp;nbsp;CustomerInfo table is province_name exists or not. I am not sure and I don't know how.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Appreciate any help.&lt;/P&gt;</description>
    <pubDate>Sun, 21 Apr 2019 16:12:06 GMT</pubDate>
    <dc:creator>DM_J</dc:creator>
    <dc:date>2019-04-21T16:12:06Z</dc:date>
    <item>
      <title>Find a string in another table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Find-a-string-in-another-table/m-p/2313599#M84439</link>
      <description>&lt;P&gt;In the middle of a flow, I need to find a string in another table, the two tables don't have any relations.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;here is a sample:&lt;/P&gt; 
&lt;P&gt;Table CustomerInfo&amp;nbsp; 100 000 rows&lt;/P&gt; 
&lt;P&gt;fields:&lt;/P&gt; 
&lt;P&gt;cust_id&lt;/P&gt; 
&lt;P&gt;cust_info&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;cust_info includes customer information like address, phone number, city, province separated by delimiters&lt;/P&gt; 
&lt;P&gt;I have a variable called &lt;STRONG&gt;prov&lt;/STRONG&gt; extracted from above with the value of the province.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Table province&amp;nbsp; 200 rows&lt;/P&gt; 
&lt;P&gt;id&lt;/P&gt; 
&lt;P&gt;name&lt;/P&gt; 
&lt;P&gt;code&lt;/P&gt; 
&lt;P&gt;country&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If the prov's value exists in the province table(province name) I want to get the province code and country.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I tried to use this solution&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCn09CAC#M92805" target="_blank" rel="noopener"&gt;https://community.talend.com/t5/Design-and-Development/Finding-keywords-in-a-tabel/m-p/151845#M92805&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I used this code in a tMap base on the solution above, but the result is a cartesian as there are not any joins between tables.&lt;/P&gt; 
&lt;P&gt;code:&lt;/P&gt; 
&lt;P&gt;row21.name.contains(row6.prov)?row21.code:""&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;row21 is lookup from&amp;nbsp;Table province and row 6 is from the main flow which I process&amp;nbsp;Table CustomerInfo&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&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-inline" image-alt="11.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M4kP.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132241i8AC737178E31CDFF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M4kP.png" alt="0683p000009M4kP.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I think I should use something like tJavaFlex and load the&amp;nbsp;Table province in the starting part and in the middle for every row of&amp;nbsp;CustomerInfo table is province_name exists or not. I am not sure and I don't know how.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Appreciate any help.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2019 16:12:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Find-a-string-in-another-table/m-p/2313599#M84439</guid>
      <dc:creator>DM_J</dc:creator>
      <dc:date>2019-04-21T16:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Find a string in another table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Find-a-string-in-another-table/m-p/2313600#M84440</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; If you are having exact match for province data with lookup table, then you can avoid Cartesian match. You need to add the row6.prov as matching key for lookup table data.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; But if your lookup data is not in a standardized format, then you are in trouble. You can do mix and match by using contain clause to try to do matching. But I am not a fan of this as it may lead to data issues later. My suggestion would be always to standardize the entire address data as the first stage and use the clean data for matching in later stages.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; Talend has already got lot of Address standardization components as shown below.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 321px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M4OQ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145874iEA36347CC6ABE2EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M4OQ.png" alt="0683p000009M4OQ.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Its up to individual customer to select which service they would prefer to use. I have used Experian data before for one of the customers for a big UK customer and the output of standardized data was in excellent condition to use further processing.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If you are planning for simple contains clause, there might be a chance of wrong match which will lead to data privacy related issues in the era of GDPR (which may result in unwanted legal issues). So discuss about all these aspects with your architect team before deciding on the match clause on raw data.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt; 
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2019 19:19:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Find-a-string-in-another-table/m-p/2313600#M84440</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-21T19:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Find a string in another table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Find-a-string-in-another-table/m-p/2313601#M84441</link>
      <description>&lt;P&gt;&lt;SPAN&gt;the row6.prov can be empty or has a province which is not in the look-up table.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So I used the join model: left join and match model: unique, but it does not return the data. I all so did trim for both sides.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But it does not return any data for exact matches.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is why I didn't use the matching.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Apr 2019 20:04:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Find-a-string-in-another-table/m-p/2313601#M84441</guid>
      <dc:creator>DM_J</dc:creator>
      <dc:date>2019-04-21T20:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Find a string in another table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Find-a-string-in-another-table/m-p/2313602#M84442</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Did you check whether the data is in same case for both main and lookup flows? It could be due to difference in case of the input data. Could you please do upper or lower case conversion and then try it? If you are still facing the problem, please share some 5 or 6 input records for both main and lookup flow for inspection.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt;
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2019 05:07:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Find-a-string-in-another-table/m-p/2313602#M84442</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-22T05:07:09Z</dc:date>
    </item>
  </channel>
</rss>

