<?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 long String in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Split-long-String/m-p/2352855#M119162</link>
    <description>&lt;P&gt;Great!&lt;/P&gt;</description>
    <pubDate>Mon, 25 Sep 2017 15:52:48 GMT</pubDate>
    <dc:creator>TRF</dc:creator>
    <dc:date>2017-09-25T15:52:48Z</dc:date>
    <item>
      <title>Split long String</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Split-long-String/m-p/2352848#M119155</link>
      <description>&lt;P&gt;please could you help me split a long string more than 50 char from input to 2 columns in output. &amp;nbsp;the output should be splitted so the columns should make sense.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;input :&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;company_name = &amp;nbsp; "i am new to talend and want to learn, &amp;nbsp;it great tool for data integration"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;output:&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;row1.company_name1 =&amp;nbsp;&lt;SPAN&gt;i am new to talend and want to&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;row1.Company_Name2 =&amp;nbsp;learn, &amp;nbsp;it great tool for data integration&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Sep 2017 01:32:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Split-long-String/m-p/2352848#M119155</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-23T01:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Split long String</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Split-long-String/m-p/2352849#M119156</link>
      <description>Hi,
&lt;BR /&gt;Using a tJavaRow and split() method you should be able to do that:
&lt;BR /&gt;
&lt;BR /&gt;String[] arr = input_row.col1.split(" ");
&lt;BR /&gt;for (String word : arr) {
&lt;BR /&gt;if ((output_row.col1.length() + word.length() + 1) &amp;lt; 50)
&lt;BR /&gt;output_row.col1 = output_row.col1 + " " + word;
&lt;BR /&gt;else
&lt;BR /&gt;output_row.col2 = output_row.col2 + " " + word;
&lt;BR /&gt;}
&lt;BR /&gt;
&lt;BR /&gt;Can't try cause actually on my mobile, but at least you got the idea.
&lt;BR /&gt;Hope this helps.</description>
      <pubDate>Sat, 23 Sep 2017 05:26:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Split-long-String/m-p/2352849#M119156</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-09-23T05:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Split long String</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Split-long-String/m-p/2352850#M119157</link>
      <description>&lt;P&gt;thanks &lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG" target="_self"&gt;&lt;/A&gt;&amp;nbsp;, not sure what I am doing wrong. for some reason it wont copy the out to excel.&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lqth.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137788i6347DC8A552E3FBA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lqth.jpg" alt="0683p000009Lqth.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 10:31:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Split-long-String/m-p/2352850#M119157</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-25T10:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Split long String</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Split-long-String/m-p/2352851#M119158</link>
      <description>&lt;P&gt;The problem is on the tFileExcelInput component which gives you no rows.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 10:44:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Split-long-String/m-p/2352851#M119158</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-09-25T10:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Split long String</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Split-long-String/m-p/2352852#M119159</link>
      <description>&lt;P&gt;fixed the tFileExcelInput , but still below error.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;not sure if tjavarow is in right place and the code in it.&lt;/P&gt; 
&lt;P&gt;input row column name is "input_row.Company_Name" I want to split it to "output_row.Company_Name" and "output_row.Company_Name1"&lt;/P&gt; 
&lt;P&gt;output_row.Company_Name can have max 50 char.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 897px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lqvx.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149588i4B2CC0C9F9ED9260/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lqvx.jpg" alt="0683p000009Lqvx.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 15:03:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Split-long-String/m-p/2352852#M119159</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-25T15:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Split long String</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Split-long-String/m-p/2352853#M119160</link>
      <description>&lt;P&gt;Probably due to null values on fields.&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;PRE&gt;String[] arr = input_row.col1.split(" ");
output_row.input_row.Company_Name = "";
output_row.input_row.Company_Name1 = "";

for (String word : arr) {
    if ((output_row.Company_Name.length() + word.length() + 1) &amp;lt; 50)
        output_row.Company_Name = output_row.Company_Name + " " + word;
    else
        output_row.Company_Name1 = output_row.Company_Name1 + " " + word;
}
if ((output_row.Company_Name1.length() &amp;lt; 1)
    output_row.Company_Name1 = null;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 15:17:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Split-long-String/m-p/2352853#M119160</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-09-25T15:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Split long String</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Split-long-String/m-p/2352854#M119161</link>
      <description>&lt;P&gt;perfect works fine.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 15:45:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Split-long-String/m-p/2352854#M119161</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-25T15:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Split long String</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Split-long-String/m-p/2352855#M119162</link>
      <description>&lt;P&gt;Great!&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 15:52:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Split-long-String/m-p/2352855#M119162</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-09-25T15:52:48Z</dc:date>
    </item>
  </channel>
</rss>

