<?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: split input_row with tJavaRow having also null values in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/split-input-row-with-tJavaRow-having-also-null-values/m-p/2213121#M10501</link>
    <description>oh yes, you´re so right! i had a look into the java documentation.. now it´s working! 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;thank you!!</description>
    <pubDate>Thu, 06 Sep 2012 12:33:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-09-06T12:33:19Z</dc:date>
    <item>
      <title>split input_row with tJavaRow having also null values</title>
      <link>https://community.qlik.com/t5/Talend-Studio/split-input-row-with-tJavaRow-having-also-null-values/m-p/2213117#M10497</link>
      <description>Hi @all
&lt;BR /&gt;Want to split Names in a table to an output table:
&lt;BR /&gt;i. e. 
&lt;BR /&gt;id Name 
&lt;BR /&gt;1 Tick
&lt;BR /&gt;2 Trick
&lt;BR /&gt;3 Tom (Jerry)
&lt;BR /&gt;4 Goofy
&lt;BR /&gt;5 Mickey (Mini)
&lt;BR /&gt;and so on.. 
&lt;BR /&gt;want to split to an output table with id, Name, Image
&lt;BR /&gt;id Name Image
&lt;BR /&gt;1 Tick Null
&lt;BR /&gt;2 Trick Null
&lt;BR /&gt;3 Tom Jerry
&lt;BR /&gt;4 Goofy Null
&lt;BR /&gt;5 Mickey Mini
&lt;BR /&gt;
&lt;BR /&gt;i´ve got some problems within the code, i think it´s a problem because of the string split
&lt;BR /&gt;String klammerAuf = "\\(";
&lt;BR /&gt;String klammerZu = "\\)"; 
&lt;BR /&gt;//String leerSchritt = " ";
&lt;BR /&gt;String container;
&lt;BR /&gt;container = "Null";
&lt;BR /&gt; int k = input_row.Name.indexOf(klammerAuf); 
&lt;BR /&gt; int l = input_row.Name.indexOf(klammerZu); 
&lt;BR /&gt; //int m = input_row.Name.indexOf(leerSchritt);
&lt;BR /&gt; if (k &amp;gt; 0 &amp;amp;&amp;amp; l &amp;gt; 0)
&lt;BR /&gt; {
&lt;BR /&gt; System.out.println("l" + l); 
&lt;BR /&gt; System.out.println("k" + k);
&lt;BR /&gt; output_row.Name = input_row.Name.split(klammerAuf); //or maybe split(klammerZu)
&lt;BR /&gt; output_row.Name = input_row.Name.split(klammerAuf); //or maybe split(klammerZu)
&lt;BR /&gt; }
&lt;BR /&gt; 
&lt;BR /&gt; if (k &amp;lt; 0 &amp;amp;&amp;amp; l &amp;lt; 0)
&lt;BR /&gt; {
&lt;BR /&gt; output_row.Name = input_row.Name;
&lt;BR /&gt; output_row.Image = container;
&lt;BR /&gt; }
&lt;BR /&gt;output_row.id = input_row.id; 
&lt;BR /&gt;--------------------------------
&lt;BR /&gt;The above denoted code will output:
&lt;BR /&gt;id Name Image
&lt;BR /&gt;1 Tick Null
&lt;BR /&gt;2 Trick Null 
&lt;BR /&gt;3 Tom (Jerry) Null
&lt;BR /&gt;4 Goofy Null
&lt;BR /&gt;5 Mickey (Mini) Null
&lt;BR /&gt;..so... it doesn´t split... 
&lt;BR /&gt;why?? where am i wrong?? it doesn´t even print out l and k, so it already has trouble with the first if-loop. i switched the code countless times &amp;gt;&amp;gt; array out of bounds exception 1, or maybe i will get a problem regex pattern when i draw off the backslashes in klammerAuf and klammerZu
&lt;BR /&gt;if i switch the code to String klammerAuf ="(Jerry)", just to see, what´s wrong (if i´ve some trouble with the brackets maybe), it looks like
&lt;BR /&gt;id Name Image
&lt;BR /&gt;1 Tick Null
&lt;BR /&gt;2 Trick Null 
&lt;BR /&gt;3 Tom Null
&lt;BR /&gt;4 Goofy Null
&lt;BR /&gt;5 Mickey (Mini) Null
&lt;BR /&gt;so then it already splits Tom (Jerry) but won´t show Jerry in the Image column.
&lt;BR /&gt; 
&lt;BR /&gt;thx for helping me.
&lt;BR /&gt;nadine</description>
      <pubDate>Wed, 05 Sep 2012 13:56:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/split-input-row-with-tJavaRow-having-also-null-values/m-p/2213117#M10497</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-05T13:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: split input_row with tJavaRow having also null values</title>
      <link>https://community.qlik.com/t5/Talend-Studio/split-input-row-with-tJavaRow-having-also-null-values/m-p/2213118#M10498</link>
      <description>ps: i want to split at the brackets, not at the explicit names like Jerry, Mini, etc. This is very important because of more Data Sets. I can´t specify all the names.</description>
      <pubDate>Wed, 05 Sep 2012 14:04:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/split-input-row-with-tJavaRow-having-also-null-values/m-p/2213118#M10498</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-05T14:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: split input_row with tJavaRow having also null values</title>
      <link>https://community.qlik.com/t5/Talend-Studio/split-input-row-with-tJavaRow-having-also-null-values/m-p/2213119#M10499</link>
      <description>String.indexOf does not use regex, so it's literally searching for \( instead of ( as you intended.</description>
      <pubDate>Thu, 06 Sep 2012 07:32:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/split-input-row-with-tJavaRow-having-also-null-values/m-p/2213119#M10499</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-09-06T07:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: split input_row with tJavaRow having also null values</title>
      <link>https://community.qlik.com/t5/Talend-Studio/split-input-row-with-tJavaRow-having-also-null-values/m-p/2213120#M10500</link>
      <description>Hi nadineherborn 
&lt;BR /&gt;Try the following code 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;if(input_row.Name.indexOf("(")!=-1){&lt;BR /&gt;output_row.Name = (StringHandling.LEFT(input_row.Name,input_row.Name.indexOf("(")-1));&lt;BR /&gt;output_row.Image = (StringHandling.LEFT(&lt;BR /&gt;(StringHandling.RIGHT(input_row.Name,input_row.Name.indexOf(")")-input_row.Name.indexOf("("))),&lt;BR /&gt;(input_row.Name.indexOf(")")-input_row.Name.indexOf("(")-1)));&lt;BR /&gt;}&lt;BR /&gt;else{&lt;BR /&gt;output_row.Name = input_row.Name;&lt;BR /&gt;}&lt;/PRE&gt; 
&lt;BR /&gt;Regards, 
&lt;BR /&gt;Brandon</description>
      <pubDate>Thu, 06 Sep 2012 10:50:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/split-input-row-with-tJavaRow-having-also-null-values/m-p/2213120#M10500</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-06T10:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: split input_row with tJavaRow having also null values</title>
      <link>https://community.qlik.com/t5/Talend-Studio/split-input-row-with-tJavaRow-having-also-null-values/m-p/2213121#M10501</link>
      <description>oh yes, you´re so right! i had a look into the java documentation.. now it´s working! 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;thank you!!</description>
      <pubDate>Thu, 06 Sep 2012 12:33:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/split-input-row-with-tJavaRow-having-also-null-values/m-p/2213121#M10501</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-06T12:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: split input_row with tJavaRow having also null values</title>
      <link>https://community.qlik.com/t5/Talend-Studio/split-input-row-with-tJavaRow-having-also-null-values/m-p/2213122#M10502</link>
      <description>Hi, 
&lt;BR /&gt;I was wondering if Talend has functionality to compute value of next row depending upon the previous row just like a loop. I have a problem where i want to calculate value of second row = value of first row + 1. But I don't want to do it simultaneously as in tMap because second value should be computed only when first value is updated. To explain better, here is equivalent loop in C that i want to implement in Talend : 
&lt;BR /&gt;for(i=0,i&amp;lt;100,i++) 
&lt;BR /&gt;{ 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;array(i+1) = array(i) + 1; 
&lt;BR /&gt;} 
&lt;BR /&gt;Is it possible by any way? I tried using tmemorizeRows and tMap but it's not working. 
&lt;BR /&gt;Thanks and regards, 
&lt;BR /&gt;Himani</description>
      <pubDate>Fri, 08 Jan 2016 07:36:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/split-input-row-with-tJavaRow-having-also-null-values/m-p/2213122#M10502</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-08T07:36:11Z</dc:date>
    </item>
  </channel>
</rss>

