<?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: [resolved] Can tJavaRow be used to filter rows or create multiple rows in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Can-tJavaRow-be-used-to-filter-rows-or-create-multiple/m-p/2297373#M69955</link>
    <description>Hello Alevy
&lt;BR /&gt;To filter out a row, use tFilterRow, to create multiple rows, we ususally use tFlowToIterate--tLoop---tFlowFixedInput to iterate each row and generate multiple rows based on this row.
&lt;BR /&gt;Best regards
&lt;BR /&gt; shong</description>
    <pubDate>Mon, 08 Mar 2010 02:23:54 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-03-08T02:23:54Z</dc:date>
    <item>
      <title>[resolved] Can tJavaRow be used to filter rows or create multiple rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Can-tJavaRow-be-used-to-filter-rows-or-create-multiple/m-p/2297371#M69953</link>
      <description>Is it possible to use tJavaRow to filter out a row or to create multiple rows from one?</description>
      <pubDate>Sat, 16 Nov 2024 13:31:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Can-tJavaRow-be-used-to-filter-rows-or-create-multiple/m-p/2297371#M69953</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2024-11-16T13:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Can tJavaRow be used to filter rows or create multiple rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Can-tJavaRow-be-used-to-filter-rows-or-create-multiple/m-p/2297372#M69954</link>
      <description>I don't know , but there is  tFilterRow</description>
      <pubDate>Wed, 03 Mar 2010 16:35:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Can-tJavaRow-be-used-to-filter-rows-or-create-multiple/m-p/2297372#M69954</guid>
      <dc:creator>jeanphi45</dc:creator>
      <dc:date>2010-03-03T16:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Can tJavaRow be used to filter rows or create multiple rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Can-tJavaRow-be-used-to-filter-rows-or-create-multiple/m-p/2297373#M69955</link>
      <description>Hello Alevy
&lt;BR /&gt;To filter out a row, use tFilterRow, to create multiple rows, we ususally use tFlowToIterate--tLoop---tFlowFixedInput to iterate each row and generate multiple rows based on this row.
&lt;BR /&gt;Best regards
&lt;BR /&gt; shong</description>
      <pubDate>Mon, 08 Mar 2010 02:23:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Can-tJavaRow-be-used-to-filter-rows-or-create-multiple/m-p/2297373#M69955</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-08T02:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Can tJavaRow be used to filter rows or create multiple rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Can-tJavaRow-be-used-to-filter-rows-or-create-multiple/m-p/2297374#M69956</link>
      <description>Thanks for your response, shong. 
&lt;BR /&gt;So, if I understand your suggestion correctly, effectively every field from your original flow gets dumped to global variables by tFlowToIterate and then has to be retrieved for each loop by tFixedFlowInput (with globalMap.get calls) and that happens for each row in the original flow? That seems very inefficient... 
&lt;BR /&gt;Based on your suggestion, if I need the row multiplication to be conditional (i.e. to only multiply some rows and to multiple some rows a different number of times) I would include the appropriate expression in the "To" field of tLoop? 
&lt;BR /&gt;Also, would it not be better to use tIterateToFlow instead of tFixedFlowInput?</description>
      <pubDate>Mon, 08 Mar 2010 02:41:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Can-tJavaRow-be-used-to-filter-rows-or-create-multiple/m-p/2297374#M69956</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2010-03-08T02:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Can tJavaRow be used to filter rows or create multiple rows</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Can-tJavaRow-be-used-to-filter-rows-or-create-multiple/m-p/2297375#M69957</link>
      <description>Hi 
&lt;BR /&gt;Yes, it looks very inefficient and nasty to maintain, but it based on your project request, because sometimes,we will repeat the row many times based on the value of one field, not simply repeat the same row many times. For exmaple: 
&lt;BR /&gt;id;name;number 
&lt;BR /&gt;1;shong;3 
&lt;BR /&gt;2;alevy;4 
&lt;BR /&gt;I hope repeat the row many times based on the number filed and the result will be something like this: 
&lt;BR /&gt;id;name;number 
&lt;BR /&gt;1;shong;3_1 
&lt;BR /&gt;1;shong;3_2 
&lt;BR /&gt;1;shong;3_3 
&lt;BR /&gt;2;alevy;4_1 
&lt;BR /&gt;2;alevy;4_2 
&lt;BR /&gt;2;alevy;4_3 
&lt;BR /&gt;2;alevy;4_4 
&lt;BR /&gt;So, I use tFlowToIterate to iteate each and store each value of field to global vars, perhaps I will do some conculation and operation on each value. 
&lt;BR /&gt;Of course, if you just want simply repeat the same row many times, as you said, use a delimiter to concatenate the row many times on tJavaRow as you want and then tNormalized the row based on item separator defined by you. 
&lt;BR /&gt;For example 
&lt;BR /&gt;tRowGenerator--tJavaRow--tNormalize--(tExtractDelimitedFileds if need)--tLogRow 
&lt;BR /&gt;please my screenshots. 
&lt;BR /&gt;code on tJavaRow: 
&lt;BR /&gt; 
&lt;PRE&gt;output_row.line=null;&lt;BR /&gt;for(int i=1;i&amp;lt;3;i++){&lt;BR /&gt;if(output_row.line==null){&lt;BR /&gt;output_row.line=input_row.id+";"+input_row.name;&lt;BR /&gt;}else{&lt;BR /&gt;output_row.line=output_row.line+"@"+input_row.id+";"+input_row.name;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Also, would it not be better to use tIterateToFlow instead of tFixedFlowInput?&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;In this case, both of them are used to generate a row. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Mon, 08 Mar 2010 03:43:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Can-tJavaRow-be-used-to-filter-rows-or-create-multiple/m-p/2297375#M69957</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-03-08T03:43:14Z</dc:date>
    </item>
  </channel>
</rss>

