<?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 Filtering Data from MySqlInput &amp;gt; tJavaRow &amp;gt; tFilterRow to MySqlOutput in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Filtering-Data-from-MySqlInput-gt-tJavaRow-gt-tFilterRow-to/m-p/2283239#M57202</link>
    <description>Hello @all: 
&lt;BR /&gt;I´m using TOS 5.1.0 and i want to filter data after some if statements in tJavaRow to MySqlOutput. 
&lt;BR /&gt;The Input Data consists of near to 200 data sets with near to 200 names. 
&lt;BR /&gt;For example: The InputData attribute "Name" contains among other characters also "?" or "/" or brackets "( )" in it. 
&lt;BR /&gt;For example: Name1/Name2? or i.e. Name1/Name2(Name3)? or i. e. Name1?/Name2? 
&lt;BR /&gt;My problem ist, that there are so many cases. I don´t know exactly the position of the slash or the brackets in the sttring, so i have to work with a for-loop! and the reason why i couldn´t specify the cases "contains" or "equals" in tFilterRow. 
&lt;BR /&gt;So i wrote a short program in tJavaRow with some if statements with "indexOf". One of these statements looks like: 
&lt;BR /&gt;"for (int i = 0; i &amp;lt; input_row.Name.length(); i++) 
&lt;BR /&gt;{ 
&lt;BR /&gt;if ((input_row.Name.length - 1).indexOf("?") 
&lt;BR /&gt;{ 
&lt;BR /&gt; System.out.println(input_row.Name) 
&lt;BR /&gt; } 
&lt;BR /&gt;} 
&lt;BR /&gt;output_row.Name = input_row.Name" 
&lt;BR /&gt; 
&lt;BR /&gt;In the component there are shown i. e. 17 datasets and the tJavaRow runs really well. But i´ve to store (if it´s possible!?) these 17 outputs to another output database and not the 200 datasets (this is the case at the moment ;() 
&lt;BR /&gt;pls help!! thx in advance!</description>
    <pubDate>Wed, 29 Aug 2012 10:51:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-08-29T10:51:36Z</dc:date>
    <item>
      <title>Filtering Data from MySqlInput &gt; tJavaRow &gt; tFilterRow to MySqlOutput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Filtering-Data-from-MySqlInput-gt-tJavaRow-gt-tFilterRow-to/m-p/2283239#M57202</link>
      <description>Hello @all: 
&lt;BR /&gt;I´m using TOS 5.1.0 and i want to filter data after some if statements in tJavaRow to MySqlOutput. 
&lt;BR /&gt;The Input Data consists of near to 200 data sets with near to 200 names. 
&lt;BR /&gt;For example: The InputData attribute "Name" contains among other characters also "?" or "/" or brackets "( )" in it. 
&lt;BR /&gt;For example: Name1/Name2? or i.e. Name1/Name2(Name3)? or i. e. Name1?/Name2? 
&lt;BR /&gt;My problem ist, that there are so many cases. I don´t know exactly the position of the slash or the brackets in the sttring, so i have to work with a for-loop! and the reason why i couldn´t specify the cases "contains" or "equals" in tFilterRow. 
&lt;BR /&gt;So i wrote a short program in tJavaRow with some if statements with "indexOf". One of these statements looks like: 
&lt;BR /&gt;"for (int i = 0; i &amp;lt; input_row.Name.length(); i++) 
&lt;BR /&gt;{ 
&lt;BR /&gt;if ((input_row.Name.length - 1).indexOf("?") 
&lt;BR /&gt;{ 
&lt;BR /&gt; System.out.println(input_row.Name) 
&lt;BR /&gt; } 
&lt;BR /&gt;} 
&lt;BR /&gt;output_row.Name = input_row.Name" 
&lt;BR /&gt; 
&lt;BR /&gt;In the component there are shown i. e. 17 datasets and the tJavaRow runs really well. But i´ve to store (if it´s possible!?) these 17 outputs to another output database and not the 200 datasets (this is the case at the moment ;() 
&lt;BR /&gt;pls help!! thx in advance!</description>
      <pubDate>Wed, 29 Aug 2012 10:51:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Filtering-Data-from-MySqlInput-gt-tJavaRow-gt-tFilterRow-to/m-p/2283239#M57202</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-29T10:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Data from MySqlInput &gt; tJavaRow &gt; tFilterRow to MySqlOutput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Filtering-Data-from-MySqlInput-gt-tJavaRow-gt-tFilterRow-to/m-p/2283240#M57203</link>
      <description>Hi&lt;BR /&gt;Can you give an example with some real data to explain your request? What are your expected result?</description>
      <pubDate>Thu, 30 Aug 2012 04:23:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Filtering-Data-from-MySqlInput-gt-tJavaRow-gt-tFilterRow-to/m-p/2283240#M57203</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-30T04:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Data from MySqlInput &gt; tJavaRow &gt; tFilterRow to MySqlOutput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Filtering-Data-from-MySqlInput-gt-tJavaRow-gt-tFilterRow-to/m-p/2283241#M57204</link>
      <description>At the moment i´ve to work with a coin-database, where one table is about the coin-issuer and you sometimes don´t know exactly the issuer of these coins. it´s a very big mix up in it and i want to give a new structure, so it could be some tables look like: 
&lt;BR /&gt;id Name 
&lt;BR /&gt;1 Name1/Name2 
&lt;BR /&gt;2 Name3 
&lt;BR /&gt;3 Name4 
&lt;BR /&gt;4 Name5/Name1? 
&lt;BR /&gt;5 Name6? 
&lt;BR /&gt;8 Name3?/Name7? 
&lt;BR /&gt;so.. i seperated all those cases in exactly 4 cases: 
&lt;BR /&gt;id1 means that it could be name1 OR name2. i call this case "alternative". 
&lt;BR /&gt;id2 and id 3 mean, that it is exactly name3 for id 2 and name4 for id3. no one else! this case i call "certain". 
&lt;BR /&gt;id4 is another case that means it was name5 OR name1 but i also could be someone else. it´s the "uncertain&amp;amp;alternative case". 
&lt;BR /&gt;id5 is name6 or someone else. it´s "uncertain". 
&lt;BR /&gt;so... everyone can see that there´s a big chaos in it, i´ve 4 different cases and if you´ve look to id1 and id4 you see two times name1.. so the database isn´t really normalized and it´s values are not atomic. 
&lt;BR /&gt;first of all i defined all cases "uncertain, certain, alternative und uncertain&amp;amp;alternative. 
&lt;BR /&gt;in the end i would like to have a database like this: 
&lt;BR /&gt;id Name 
&lt;BR /&gt;1 Name1 
&lt;BR /&gt;2 Name2 
&lt;BR /&gt;3 Name3 
&lt;BR /&gt;... 
&lt;BR /&gt;so i´ve to split the names and would give them id´s for uncertainty. certain = 1, uncertain = 2, and so on to make sure, that those, who use the database, can see, if someone is certain or not. 
&lt;BR /&gt;behind this table there´s a main table, called "coinfind" where you can find all the informations about that coins. 
&lt;BR /&gt;i. e. coin id 126 has now issuer 1 (Name1/Name2) but coin 177 has the issuer id 4 (Name5/Name1?). finally i would like to make a lookup and replace the id´s, where you can see the Names two or more times. Name1 i. e. has two different id´s and should only have one in the end. 
&lt;BR /&gt;to cut a long story short: 
&lt;BR /&gt;now i´m doing the filter of those 4 cases. in one table all the certain id´s. in the second all the uncertain ones. in the third all the alternatives (which i have to split afterwards). then i will give them all their uncertain id´s and then i would like make the loopup and replace the id´s. 
&lt;BR /&gt;now i did 4 jobs: from mysql input to tjavarow to mysql output. i use tjavarow in 4 different jobs. one job for certain, one for uncertain and so on. in the certain job i only would like to have names without "?" and without "/".. 
&lt;BR /&gt;so i did some if statements. now the issuer table has near to 200 data sets. i. e. i´ve after tjavarow 22 certain id´s.. i can see them well in the component, but it doesn´t write them in the ouput database. in the output database there will be the 200 datasets again from the beginning. 
&lt;BR /&gt;because that i´ve more cases and because that in the cases i have to define exactly the index of a "?" or a "/", i can´t work with "contains" or the the operator in the tFilterRow. 
&lt;BR /&gt;i´ve no more ideas to resolve the problem ;( and i´m very thankful for your response.</description>
      <pubDate>Thu, 30 Aug 2012 08:27:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Filtering-Data-from-MySqlInput-gt-tJavaRow-gt-tFilterRow-to/m-p/2283241#M57204</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-30T08:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Data from MySqlInput &gt; tJavaRow &gt; tFilterRow to MySqlOutput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Filtering-Data-from-MySqlInput-gt-tJavaRow-gt-tFilterRow-to/m-p/2283242#M57205</link>
      <description>Hi
&lt;BR /&gt;You don't need to create 4 jobs, only one job is OK to filter thoese 4 cases, use tReplicate to replicate the data flow and then link to 4 tFilterRow components, each tFilterRow filter one case. Note that, tJavaRow don't filter rows, if the incoming data flow has N rows, it also output N rows. I created an example to explain to get all the certain rows. see my screeshots
&lt;BR /&gt;If you really want to use tJavaRow in your case, the code should be like:
&lt;BR /&gt;
&lt;PRE&gt;"for (int i = 0; i &amp;lt; input_row.Name.length(); i++)&lt;BR /&gt;{&lt;BR /&gt;if ((input_row.Name.length - 1).indexOf("?")&lt;BR /&gt;{&lt;BR /&gt;  System.out.println(input_row.Name)&lt;BR /&gt; output_row.name=input_row.name;&lt;BR /&gt;}else{&lt;BR /&gt;output_row.name="";&lt;BR /&gt;}&lt;BR /&gt;}&lt;/PRE&gt;
&lt;BR /&gt;and then, add a tFilterRow after tJavaRow to remove all the rows which name is "".</description>
      <pubDate>Thu, 30 Aug 2012 08:49:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Filtering-Data-from-MySqlInput-gt-tJavaRow-gt-tFilterRow-to/m-p/2283242#M57205</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-08-30T08:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Data from MySqlInput &gt; tJavaRow &gt; tFilterRow to MySqlOutput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Filtering-Data-from-MySqlInput-gt-tJavaRow-gt-tFilterRow-to/m-p/2283243#M57206</link>
      <description>thx for your quick reply. 
&lt;BR /&gt;i solved the problem with using tjavarow and the filter, but i had a problem with the for-loop (because of tjava"row", solution was "output_row.Uncertainty = "false"; " in the beginning of the programm) and another one within the filter. in the filter now i´m using &amp;gt;&amp;gt; Uncertainty (input row), Operator == and uncertain or certain to filter. so.. thx for helping me!! 
&lt;BR /&gt;String fragezeichen = "?";
&lt;BR /&gt;String slash = "/";
&lt;BR /&gt;String klammerAuf = "(";
&lt;BR /&gt;String klammerZu = ")";
&lt;BR /&gt;String fragezeichenMitte = "? (";
&lt;BR /&gt;output_row.Uncertainty = "uncertain"; 
&lt;BR /&gt; 
&lt;BR /&gt; int k = input_row.Name.indexOf(fragezeichen); //k ist Position von "?"
&lt;BR /&gt; int l = input_row.Name.indexOf(slash); //l ist Position von "/"
&lt;BR /&gt; int m = input_row.Name.indexOf(klammerAuf); //m ist Position von "("
&lt;BR /&gt; int n = input_row.Name.indexOf(klammerZu); //n ist Position von ")"
&lt;BR /&gt; int o = input_row.Name.indexOf(fragezeichenMitte); //o ist Position von "? ("
&lt;BR /&gt; 
&lt;BR /&gt; if ((k &amp;lt; 0 &amp;amp;&amp;amp; l &amp;lt; 0) || (m &amp;lt; l &amp;amp;&amp;amp; l &amp;lt; n))
&lt;BR /&gt; {
&lt;BR /&gt; System.out.println("k" + k);
&lt;BR /&gt; System.out.println("l" + l);
&lt;BR /&gt; System.out.println("m" + m);
&lt;BR /&gt; System.out.println("n" + n); 
&lt;BR /&gt; System.out.println(input_row.id + input_row.Name);
&lt;BR /&gt; output_row.Uncertainty = "certain"; 
&lt;BR /&gt; }
&lt;BR /&gt; 
&lt;BR /&gt;output_row.Name = input_row.Name;
&lt;BR /&gt;output_row.id = input_row.id; 
&lt;BR /&gt;output_row.Description = input_row.Description;
&lt;BR /&gt;output_row.Uncertainty = output_row.Uncertainty;
&lt;BR /&gt;
&lt;BR /&gt;nadine</description>
      <pubDate>Tue, 04 Sep 2012 13:36:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Filtering-Data-from-MySqlInput-gt-tJavaRow-gt-tFilterRow-to/m-p/2283243#M57206</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-04T13:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Data from MySqlInput &gt; tJavaRow &gt; tFilterRow to MySqlOutput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Filtering-Data-from-MySqlInput-gt-tJavaRow-gt-tFilterRow-to/m-p/2283244#M57207</link>
      <description>Hi,
&lt;BR /&gt;Didn't mean to break the flow of the discussion but believe the functionality can be achieved with 
&lt;B&gt;tExtractRegexFields&lt;/B&gt; also you can try with following expression 
&lt;B&gt;"(^*$)"&lt;/B&gt;
&lt;BR /&gt;And schema would be like 
&lt;BR /&gt;Name -- FilteredName
&lt;BR /&gt;Location -- Location
&lt;BR /&gt;Where FilteredName represents all the name after filtering ()*&amp;amp;^%$#@! and other special character, it follows rule that string should start with a character(either in lower case or upper case), contains characters(either in lower case or upper case) or spaces in between and should end with either a character(either in lower case or upper case) or with a space.
&lt;BR /&gt;Hope that helps.
&lt;BR /&gt;--
&lt;BR /&gt;Regards,
&lt;BR /&gt;Vinod</description>
      <pubDate>Tue, 04 Sep 2012 15:13:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Filtering-Data-from-MySqlInput-gt-tJavaRow-gt-tFilterRow-to/m-p/2283244#M57207</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-04T15:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Data from MySqlInput &gt; tJavaRow &gt; tFilterRow to MySqlOutput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Filtering-Data-from-MySqlInput-gt-tJavaRow-gt-tFilterRow-to/m-p/2283245#M57208</link>
      <description>Dear, again in the 
&lt;A href="http://www.mmolive.com" target="_blank" rel="nofollow noopener noreferrer"&gt;www.mmolive.com&lt;/A&gt; valentine's day. I don't know how many of you have me to your chocolate, but I see clearly... 
&lt;A href="http://www.mmohome.com" target="_blank" rel="nofollow noopener noreferrer"&gt;www.mmohome.com&lt;/A&gt; 
&lt;BR /&gt; !This year I can send--to reduce weight tea?</description>
      <pubDate>Wed, 05 Sep 2012 04:04:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Filtering-Data-from-MySqlInput-gt-tJavaRow-gt-tFilterRow-to/m-p/2283245#M57208</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-05T04:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Data from MySqlInput &gt; tJavaRow &gt; tFilterRow to MySqlOutput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Filtering-Data-from-MySqlInput-gt-tJavaRow-gt-tFilterRow-to/m-p/2283246#M57209</link>
      <description>ok, thx, next time i will try to use it. &lt;BR /&gt;now i´ve another problem with the .split method, but i will open another thread.</description>
      <pubDate>Wed, 05 Sep 2012 13:26:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Filtering-Data-from-MySqlInput-gt-tJavaRow-gt-tFilterRow-to/m-p/2283246#M57209</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-05T13:26:42Z</dc:date>
    </item>
  </channel>
</rss>

