<?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: tFileInputDelimited-tSetGlobalVar-tMap/tFilterRow depending of preceed in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tFileInputDelimited-tSetGlobalVar-tMap-tFilterRow-depending-of/m-p/2287526#M61102</link>
    <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Have you looked at tUniqRow?&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;@jholman 
&lt;BR /&gt;Thanks, this seems to be the solution. Will give it a try definitely. 
&lt;BR /&gt;Hope that all duplicates will be removed and not only "the first encountered duplicate". 
&lt;BR /&gt;Instead of tJavaFlex I probably could have used a user defined function in the expression filter of tMap.</description>
    <pubDate>Thu, 17 Dec 2009 18:39:03 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2009-12-17T18:39:03Z</dc:date>
    <item>
      <title>tFileInputDelimited-tSetGlobalVar-tMap/tFilterRow depending of preceed</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileInputDelimited-tSetGlobalVar-tMap-tFilterRow-depending-of/m-p/2287522#M61098</link>
      <description>hi,
&lt;BR /&gt;wonder how to manage a row filter which let me group rows depending of field content equality.
&lt;BR /&gt;in simply java it would be so simple but how i succeed with talend:
&lt;BR /&gt;globalMap.put("Ship_Number", ""); // can do this with tSetGlobalVar
&lt;BR /&gt;if (!row1.Ship_Number.equals(globalMap.get("Ship_Number")) ... // if NOT equal do something e.g. an entry in tLogRow or any output file. i can do this with a filter in tMap
&lt;BR /&gt;globalMap.put("Ship_Number", row1.Ship_Number); // but where can i do this for each row like iterating tSetGlobalVar but within tFileInputDelimited?
&lt;BR /&gt;hope it's clear enough.
&lt;BR /&gt;12345 &amp;gt; make new record
&lt;BR /&gt;12345 &amp;gt; do nothing
&lt;BR /&gt;22222 &amp;gt; make new record
&lt;BR /&gt;22222 &amp;gt; do nothing
&lt;BR /&gt;22222 &amp;gt; do nothing
&lt;BR /&gt;33333 &amp;gt; make new record
&lt;BR /&gt;44444 &amp;gt; make new record and so on
&lt;BR /&gt;thanks in advance</description>
      <pubDate>Sat, 16 Nov 2024 13:38:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileInputDelimited-tSetGlobalVar-tMap-tFilterRow-depending-of/m-p/2287522#M61098</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2024-11-16T13:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: tFileInputDelimited-tSetGlobalVar-tMap/tFilterRow depending of preceed</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileInputDelimited-tSetGlobalVar-tMap-tFilterRow-depending-of/m-p/2287523#M61099</link>
      <description>Hello 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;globalMap.put("Ship_Number", row1.Ship_Number); // but where can i do this for each row like iterating tSetGlobalVar but within tFileInputDelimited?&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Why do you mean within tFileInputDelimited? I think you can link it to a tJavaRow and filter it on it, eg: 
&lt;BR /&gt;tFileInputDelimited---main--tJavaRow 
&lt;BR /&gt;on tJavaRow, some code like this: 
&lt;BR /&gt; 
&lt;PRE&gt;//here the data type of Ship_Number is string.&lt;BR /&gt;if((String)globalMap.get("Ship_Number").equals(input_row.Ship_Number)){&lt;BR /&gt;do something;&lt;BR /&gt;}esle{&lt;BR /&gt;do nothing;&lt;BR /&gt;}&lt;BR /&gt;globalMap.put("Ship_Number",input_row.Ship_Number);&lt;/PRE&gt; 
&lt;BR /&gt;Best regards 
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Tue, 15 Dec 2009 03:28:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileInputDelimited-tSetGlobalVar-tMap-tFilterRow-depending-of/m-p/2287523#M61099</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-12-15T03:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: tFileInputDelimited-tSetGlobalVar-tMap/tFilterRow depending of preceed</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileInputDelimited-tSetGlobalVar-tMap-tFilterRow-depending-of/m-p/2287524#M61100</link>
      <description>@shong 
&lt;BR /&gt;thanks very much for your worth hint. 
&lt;BR /&gt;tFileInputDelimited --- row1 (Main) --&amp;gt; tJavaFlex --- row3 (Main) --&amp;gt; tMap 
&lt;BR /&gt; 
&lt;BR /&gt;in the end I used an unused field in a tJavaFlex component (Schema Type of tFileInputDelimited) to filter unwanted rows in the tMap with: 
&lt;BR /&gt;row3.Unused_Field.equals("OK") 
&lt;BR /&gt;but I think there is a better solution, isn't it? 
&lt;BR /&gt;my code in tJavaFlex: 
&lt;BR /&gt;// start part of your Java code 
&lt;BR /&gt;java.util.Set&amp;lt;String&amp;gt; ship_numbers = new java.util.HashSet&amp;lt;String&amp;gt;(); 
&lt;BR /&gt;// here is the main part of the component, 
&lt;BR /&gt;// a piece of code executed in the row 
&lt;BR /&gt;// loop 
&lt;BR /&gt;if (row1.Ship_Number.trim().length() &amp;gt; 0 &amp;amp;&amp;amp; 
&lt;BR /&gt; ship_numbers.add(row1.Ship_Number)) { 
&lt;BR /&gt; row1.Unused_Field = "OK"; 
&lt;BR /&gt; System.out.println("Ship_Number: " + row1.Ship_Number + ' ' + row1.LI_Item_Code); 
&lt;BR /&gt;} else { 
&lt;BR /&gt; System.out.println("Duplicate detected: " + row1.Ship_Number); 
&lt;BR /&gt;}</description>
      <pubDate>Tue, 15 Dec 2009 18:23:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileInputDelimited-tSetGlobalVar-tMap-tFilterRow-depending-of/m-p/2287524#M61100</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2009-12-15T18:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: tFileInputDelimited-tSetGlobalVar-tMap/tFilterRow depending of preceed</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileInputDelimited-tSetGlobalVar-tMap-tFilterRow-depending-of/m-p/2287525#M61101</link>
      <description>Have you looked at tUniqRow?</description>
      <pubDate>Wed, 16 Dec 2009 20:44:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileInputDelimited-tSetGlobalVar-tMap-tFilterRow-depending-of/m-p/2287525#M61101</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-12-16T20:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: tFileInputDelimited-tSetGlobalVar-tMap/tFilterRow depending of preceed</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileInputDelimited-tSetGlobalVar-tMap-tFilterRow-depending-of/m-p/2287526#M61102</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Have you looked at tUniqRow?&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;@jholman 
&lt;BR /&gt;Thanks, this seems to be the solution. Will give it a try definitely. 
&lt;BR /&gt;Hope that all duplicates will be removed and not only "the first encountered duplicate". 
&lt;BR /&gt;Instead of tJavaFlex I probably could have used a user defined function in the expression filter of tMap.</description>
      <pubDate>Thu, 17 Dec 2009 18:39:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileInputDelimited-tSetGlobalVar-tMap-tFilterRow-depending-of/m-p/2287526#M61102</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2009-12-17T18:39:03Z</dc:date>
    </item>
  </channel>
</rss>

