<?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 value from table in a csv in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/find-a-value-from-table-in-a-csv/m-p/2322267#M92226</link>
    <description>&lt;P&gt;I am new to Talend and I want to know how I can iterate through a file and compare a value with a table.&lt;/P&gt;
&lt;P&gt;Suppose I want to check if a driver has how many fines.&lt;/P&gt;
&lt;P&gt;Table Driver: ID, d_license, name&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample data:&lt;/P&gt;
&lt;P&gt;1, 54B43D, John Smith&lt;/P&gt;
&lt;P&gt;2,343d23F, Jane Do&lt;/P&gt;
&lt;P&gt;3, 567S4R, Sharlot J.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fine.csv: fine_id, name, fine&lt;/P&gt;
&lt;P&gt;Sample data:&lt;/P&gt;
&lt;P&gt;42, Jane Do, 54$&lt;/P&gt;
&lt;P&gt;23, John Smith, 43$&lt;/P&gt;
&lt;P&gt;54, Jane Do, 17$&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Desired output:&lt;/P&gt;
&lt;P&gt;ID, driver license, Name, fines(how many), Total&lt;/P&gt;
&lt;P&gt;1, 54B43D,&amp;nbsp; &amp;nbsp; John Smith, 1, 43&lt;/P&gt;
&lt;P&gt;2,343d23F,&amp;nbsp; &amp;nbsp; &amp;nbsp; Jane Do,&amp;nbsp; 2 , 54+17&lt;/P&gt;
&lt;P&gt;3, 567S4R,&amp;nbsp; &amp;nbsp; &amp;nbsp;Sharlot J.,0,0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 05:21:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T05:21:50Z</dc:date>
    <item>
      <title>find a value from table in a csv</title>
      <link>https://community.qlik.com/t5/Talend-Studio/find-a-value-from-table-in-a-csv/m-p/2322267#M92226</link>
      <description>&lt;P&gt;I am new to Talend and I want to know how I can iterate through a file and compare a value with a table.&lt;/P&gt;
&lt;P&gt;Suppose I want to check if a driver has how many fines.&lt;/P&gt;
&lt;P&gt;Table Driver: ID, d_license, name&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample data:&lt;/P&gt;
&lt;P&gt;1, 54B43D, John Smith&lt;/P&gt;
&lt;P&gt;2,343d23F, Jane Do&lt;/P&gt;
&lt;P&gt;3, 567S4R, Sharlot J.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fine.csv: fine_id, name, fine&lt;/P&gt;
&lt;P&gt;Sample data:&lt;/P&gt;
&lt;P&gt;42, Jane Do, 54$&lt;/P&gt;
&lt;P&gt;23, John Smith, 43$&lt;/P&gt;
&lt;P&gt;54, Jane Do, 17$&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Desired output:&lt;/P&gt;
&lt;P&gt;ID, driver license, Name, fines(how many), Total&lt;/P&gt;
&lt;P&gt;1, 54B43D,&amp;nbsp; &amp;nbsp; John Smith, 1, 43&lt;/P&gt;
&lt;P&gt;2,343d23F,&amp;nbsp; &amp;nbsp; &amp;nbsp; Jane Do,&amp;nbsp; 2 , 54+17&lt;/P&gt;
&lt;P&gt;3, 567S4R,&amp;nbsp; &amp;nbsp; &amp;nbsp;Sharlot J.,0,0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:21:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/find-a-value-from-table-in-a-csv/m-p/2322267#M92226</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T05:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: find a value from table in a csv</title>
      <link>https://community.qlik.com/t5/Talend-Studio/find-a-value-from-table-in-a-csv/m-p/2322268#M92227</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; Please refer the screenshots for overall flow and component details.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M5Wk.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142003i36034C9F0B7065F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M5Wk.png" alt="0683p000009M5Wk.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Driver details will be the main flow and fine file will be the lookup flow. The first step is to remove $ value from fine file.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M6CQ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141349i8FA09AF4E3481B18/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M6CQ.png" alt="0683p000009M6CQ.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;row2.fine.replaceAll("\\$","") &lt;/PRE&gt; 
&lt;P&gt;Then convert the fine value from String to integer.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M6CV.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157553i12E2978A016E3C86/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M6CV.png" alt="0683p000009M6CV.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The next stage is to do all Match for the fine lookup data with driver main flow and join them using tMap.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M60Q.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144679iDEDF95B09B35C4CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M60Q.png" alt="0683p000009M60Q.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Now, do the group by and add two new columns to do the count and sum. You will get desired output from the output connection of this component.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M5ql.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143429i8C0BAA16BB209E73/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M5ql.png" alt="0683p000009M5ql.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The name of all components are available in screenshots themselves. Please spare a second to mark the topic as resolved.&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; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 04:18:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/find-a-value-from-table-in-a-csv/m-p/2322268#M92227</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-08T04:18:49Z</dc:date>
    </item>
  </channel>
</rss>

