<?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 row in multiple rows (new row after x chars) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Split-row-in-multiple-rows-new-row-after-x-chars/m-p/2264729#M44482</link>
    <description>Hi,&lt;BR /&gt;You can use a tSplitRow.&lt;BR /&gt;If max input length is known and not to high, use tSplitRow.&lt;BR /&gt;In the Columns mapping tab add as many rows as needed.&lt;BR /&gt;For exemple:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;row3.longString.substring(0, 2610)&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;row3.longString.substring(2611, 5220)&lt;BR /&gt;&amp;nbsp; and so on&lt;BR /&gt;Else, you need a procedural approach using tLoop, tJavaRow, tHashOutput and may be 1 ou 2 global variables.&lt;BR /&gt;Hope this helps.&lt;BR /&gt;TRF</description>
    <pubDate>Fri, 14 Oct 2016 21:35:26 GMT</pubDate>
    <dc:creator>KELASRI</dc:creator>
    <dc:date>2016-10-14T21:35:26Z</dc:date>
    <item>
      <title>Split row in multiple rows (new row after x chars)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Split-row-in-multiple-rows-new-row-after-x-chars/m-p/2264727#M44480</link>
      <description>hello,
&lt;BR /&gt;i would like to split a row (string) to multiple rows.
&lt;BR /&gt;i have a string (size 15660 chars or more), and i would like to split it in multiple rows after each 2610 chars. so i can process each sub-string&amp;nbsp;
&lt;BR /&gt;'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ===&amp;gt;&amp;nbsp;
&lt;BR /&gt;'aaaaaaaaaaaaaaaaaaaa'
&lt;BR /&gt;'aaaaaaaaaaaaaaaaaaaa'
&lt;BR /&gt;'aaaaaaaaaaaaaaaaaaaa'
&lt;BR /&gt;Thanks.
&lt;BR /&gt;i took a look on 'tSplitRow' but it does not do what i wont. (or i didn't understood :-/)&amp;nbsp;
&lt;BR /&gt;thanks.</description>
      <pubDate>Fri, 14 Oct 2016 08:57:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Split-row-in-multiple-rows-new-row-after-x-chars/m-p/2264727#M44480</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2016-10-14T08:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: Split row in multiple rows (new row after x chars)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Split-row-in-multiple-rows-new-row-after-x-chars/m-p/2264728#M44481</link>
      <description>Hi,&lt;BR /&gt;You can use a tSplitRow.&lt;BR /&gt;If max input length is known and not to high, use tSplitRow.&lt;BR /&gt;In the Columns mapping tab add as many rows as needed.&lt;BR /&gt;For exemple:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;row3.longString.substring(0, 2610)&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;row3.longString.substring(2611, 5220)&lt;BR /&gt;&amp;nbsp; and so on&lt;BR /&gt;Else, you need a procedural approach using tLoop, tJavaRow, tHashOutput and may be 1 ou 2 global variables.&lt;BR /&gt;Hope this helps.&lt;BR /&gt;TRF</description>
      <pubDate>Fri, 14 Oct 2016 21:31:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Split-row-in-multiple-rows-new-row-after-x-chars/m-p/2264728#M44481</guid>
      <dc:creator>KELASRI</dc:creator>
      <dc:date>2016-10-14T21:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: Split row in multiple rows (new row after x chars)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Split-row-in-multiple-rows-new-row-after-x-chars/m-p/2264729#M44482</link>
      <description>Hi,&lt;BR /&gt;You can use a tSplitRow.&lt;BR /&gt;If max input length is known and not to high, use tSplitRow.&lt;BR /&gt;In the Columns mapping tab add as many rows as needed.&lt;BR /&gt;For exemple:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;row3.longString.substring(0, 2610)&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;row3.longString.substring(2611, 5220)&lt;BR /&gt;&amp;nbsp; and so on&lt;BR /&gt;Else, you need a procedural approach using tLoop, tJavaRow, tHashOutput and may be 1 ou 2 global variables.&lt;BR /&gt;Hope this helps.&lt;BR /&gt;TRF</description>
      <pubDate>Fri, 14 Oct 2016 21:35:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Split-row-in-multiple-rows-new-row-after-x-chars/m-p/2264729#M44482</guid>
      <dc:creator>KELASRI</dc:creator>
      <dc:date>2016-10-14T21:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: Split row in multiple rows (new row after x chars)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Split-row-in-multiple-rows-new-row-after-x-chars/m-p/2264730#M44483</link>
      <description>This tutorial may help ( 
&lt;A href="https://www.rilhia.com/quicktips/quick-tip-row-multiplication" rel="nofollow noopener noreferrer"&gt;https://www.rilhia.com/quicktips/quick-tip-row-multiplication&lt;/A&gt;). It is not exactly what you want to do, but should give you an idea of how you can achieve the row multiplication. You will see in the tutorial that a number is used to decide how many rows should be returned. You can use the String column value to calculate this in the "Start Code" section of the tJavaFlex. 
&lt;BR /&gt;Like below... 
&lt;BR /&gt; 
&lt;PRE&gt;String  stringVal = ((String)globalMap.get("myKey")); //Retrieves the value supplied to the tMap&lt;BR /&gt;int len = 2610; //Your String length&lt;BR /&gt;int count = (stringVal.length()/len) + (stringVal.length()%len &amp;gt; 0 ? 1 : 0); //Calculate the number of loops&lt;BR /&gt;for(int i = 0; i&amp;lt;count; i++){ //Start loops&lt;BR /&gt;&lt;/PRE&gt; 
&lt;BR /&gt;Then in the "Main Code" do something like this... 
&lt;BR /&gt; 
&lt;PRE&gt;if(i==(count-1)){ //If it is the last loop, set the String length as the end of the substring&lt;BR /&gt;	row2.newColumn = stringVal.substring(len*i,stringVal.length());&lt;BR /&gt;}else{ //Otherwise use increments of len&lt;BR /&gt;	row2.newColumn = stringVal.substring(len*i,(len*i)+len);&lt;BR /&gt;}&lt;BR /&gt;row2.newColumn1 = i+1; //return loop number (if necessary)&lt;/PRE&gt; 
&lt;BR /&gt;The "End Code".... 
&lt;BR /&gt; 
&lt;PRE&gt;} //Close loop&lt;/PRE&gt; 
&lt;BR /&gt;Hope this helps</description>
      <pubDate>Sat, 15 Oct 2016 21:14:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Split-row-in-multiple-rows-new-row-after-x-chars/m-p/2264730#M44483</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-15T21:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: Split row in multiple rows (new row after x chars)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Split-row-in-multiple-rows-new-row-after-x-chars/m-p/2264731#M44484</link>
      <description>thanks for yours&amp;nbsp;replies,&lt;BR /&gt;I finally used Java, to perform split,&lt;BR /&gt;i just wonted to find a talend component that allow to split string after each chars.&amp;nbsp;&lt;BR /&gt;the solution with tloop and then do a split, its graphically nice so others person can understand what i'm doing. but java its fast and cleaner.&lt;BR /&gt;thanks.</description>
      <pubDate>Mon, 30 Jan 2017 12:37:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Split-row-in-multiple-rows-new-row-after-x-chars/m-p/2264731#M44484</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2017-01-30T12:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Split row in multiple rows (new row after x chars)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Split-row-in-multiple-rows-new-row-after-x-chars/m-p/2264732#M44485</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;I know its too late for a reply. But posting it anyway as it might help someone else facing the similar issue now and going forward. It can be done using&amp;nbsp;&lt;SPAN&gt;&lt;EM&gt;tJavaFlex&lt;/EM&gt; as in one of earlier replies. But it can be done easily using&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;tFileInputPositional&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;and set&lt;/SPAN&gt;&lt;EM&gt;&amp;nbsp;&lt;STRONG&gt;""&lt;/STRONG&gt; &lt;/EM&gt;&lt;SPAN&gt;as &lt;/SPAN&gt;&lt;STRONG&gt;Row Separator&lt;/STRONG&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;STRONG&gt;Pattern&lt;/STRONG&gt;&lt;SPAN&gt; as&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt; "2610"&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;as follows:&lt;/SPAN&gt;&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-center" image-alt="talendPost.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M5r3.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139956i9B4BC5523D216196/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M5r3.png" alt="0683p000009M5r3.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;It should split a row (string) to multiple rows having 2610 characters in each row. So, it should generate total of 6 rows (15660&amp;nbsp;/&amp;nbsp;2610).&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Hope this helps !&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 19:49:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Split-row-in-multiple-rows-new-row-after-x-chars/m-p/2264732#M44485</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-12T19:49:33Z</dc:date>
    </item>
  </channel>
</rss>

