<?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: tNormalize on 2 columns (or more) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317061#M87547</link>
    <description>Hello All,&lt;BR /&gt;Can anyone please help me to resolve the above issue please~~~&lt;BR /&gt;Thank You!</description>
    <pubDate>Tue, 05 Jun 2012 13:59:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-06-05T13:59:07Z</dc:date>
    <item>
      <title>tNormalize on 2 columns (or more)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317057#M87543</link>
      <description>Hello,&lt;BR /&gt;is there a way to Normalize a row on 2 columns ?&lt;BR /&gt;index;col1;col2&lt;BR /&gt;row1;blue,green;1,2&lt;BR /&gt;row2;black,white,red;3,4,5&lt;BR /&gt;would become&lt;BR /&gt;row1;blue;1&lt;BR /&gt;row2;green;2&lt;BR /&gt;row3;black;3&lt;BR /&gt;row4;white;4&lt;BR /&gt;row5;red;5&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Xavier</description>
      <pubDate>Sat, 16 Nov 2024 13:56:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317057#M87543</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: tNormalize on 2 columns (or more)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317058#M87544</link>
      <description>Hello Xavier 
&lt;BR /&gt;You need to write some java code to finish your request. Here is my example: 
&lt;BR /&gt;Go to Repository--&amp;gt;Code--&amp;gt;and click on the Routine, select 'create routine' option, create a new routine: 
&lt;BR /&gt; 
&lt;PRE&gt;package routines;&lt;BR /&gt;public class Forum6748Routine {&lt;BR /&gt;	static java.util.Map&amp;lt;String, String&amp;gt; map = new java.util.HashMap&amp;lt;String, String&amp;gt;();&lt;BR /&gt;	public static String getCol2Value(String col2) {&lt;BR /&gt;		String value = null;&lt;BR /&gt;		String[] array = col2.split(",");&lt;BR /&gt;		for (int i = 0; i &amp;lt; array.length; i++) {&lt;BR /&gt;			String item = array&lt;I&gt;;&lt;BR /&gt;			if ((String) map.get(item) == null) {&lt;BR /&gt;				value = item;&lt;BR /&gt;				map.put(item, item);&lt;BR /&gt;				break;&lt;BR /&gt;			}&lt;BR /&gt;		}&lt;BR /&gt;		return value;&lt;BR /&gt;	}&lt;BR /&gt;}&lt;/I&gt;&lt;/PRE&gt; 
&lt;BR /&gt;test.csv: 
&lt;BR /&gt; 
&lt;B&gt;&lt;BR /&gt;row1;blue,green;1,2&lt;BR /&gt;row2;black,white,red;3,4,5&lt;BR /&gt;row3;butter,charcoal,clay,yellow;6,7,8,9&lt;BR /&gt;&lt;/B&gt; 
&lt;BR /&gt;result: 
&lt;BR /&gt; 
&lt;PRE&gt;Starting job forum6748 at 20:25 25/05/2009.&lt;BR /&gt;.-----+--------+----.&lt;BR /&gt;|     tLogRow_1     |&lt;BR /&gt;|=----+--------+---=|&lt;BR /&gt;|rowID|col1    |col2|&lt;BR /&gt;|=----+--------+---=|&lt;BR /&gt;|row1 |blue    |1   |&lt;BR /&gt;|row2 |green   |2   |&lt;BR /&gt;|row3 |black   |3   |&lt;BR /&gt;|row4 |white   |4   |&lt;BR /&gt;|row5 |red     |5   |&lt;BR /&gt;|row6 |butter  |6   |&lt;BR /&gt;|row7 |charcoal|7   |&lt;BR /&gt;|row8 |clay    |8   |&lt;BR /&gt;|row9 |yellow  |9   |&lt;BR /&gt;'-----+--------+----'&lt;BR /&gt;Job forum6748 ended at 20:25 25/05/2009. &lt;/PRE&gt; 
&lt;BR /&gt;Let me know if you have any questions! 
&lt;BR /&gt;Best regards 
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Mon, 25 May 2009 13:33:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317058#M87544</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-25T13:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: tNormalize on 2 columns (or more)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317059#M87545</link>
      <description>OK.&lt;BR /&gt;I use a different function but I'm using you method with 2 others static variables.&lt;BR /&gt;Thanks for this idea.</description>
      <pubDate>Mon, 25 May 2009 14:46:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317059#M87545</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-25T14:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: tNormalize on 2 columns (or more)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317060#M87546</link>
      <description>Hi Shong, 
&lt;BR /&gt;Do i just duplicate the above Java Routines with different Column Name and i shall be able to Normalize more than 2 columns? 
&lt;BR /&gt;I've tried to amend the routine but it doesn't give me my expected result. 
&lt;BR /&gt; public static String getDEBIT_MOVEMENTValue(String DEBIT_MOVEMENT) { 
&lt;BR /&gt; String value = null; 
&lt;BR /&gt; String[] array = DEBIT_MOVEMENT.split(","); 
&lt;BR /&gt; for (int i = 0; i &amp;lt; array.length; i++) { 
&lt;BR /&gt; String item = array 
&lt;I&gt;;&lt;BR /&gt; if ((String) map.get(item) == null) {&lt;BR /&gt; value = item;&lt;BR /&gt; map.put(item, item);&lt;BR /&gt; break;&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; return value;&lt;BR /&gt; }&lt;BR /&gt;My Data:&lt;BR /&gt;@ID;K_TYPE;BALANCE;DEBIT_MOVEMENT;CREDIT_MOVEMENT;LOCAL_BALANCE;LOCAL_DEBIT_MVE;LOCAL_CREDT_MVE&lt;BR /&gt;LD.1.TR.USD.21052.2001.MY.5Y....2800.....MY0012101;51001,LIVEDB;-1240.91,-1000000;-221.53,-1700000;,; -3802.83,-3064550;-678.24,-5209735;3.66,7965&lt;BR /&gt;&lt;BR /&gt;My Output: &lt;BR /&gt;+---------------+-------------+---------------+--------------=|&lt;BR /&gt;|_ID |K_TYPE|BALANCE |DEBIT_MOVEMENT|CREDIT_MOVEMENT|LOCAL_BALANCE|LOCAL_DEBIT_MVE|LOCAL_CREDT_MVE|&lt;BR /&gt;|=-------------------------------------------------+------+--------+--------------+---------------+-------------+---------------+--------------=|&lt;BR /&gt;|LD.1.TR.USD.21052.2001.MY.5Y....2800.....MY0012101|51001 |-1240.91|-221.53 |null |-3802.83 |-678.24 |3.66 |&lt;BR /&gt;|LD.1.TR.USD.21052.2001.MY.5Y....2800.....MY0012101|LIVEDB|-1000000|null |null |-3064550 |null |null |&lt;BR /&gt;'--------------------------------------------------+------+--------+--------------+---------------+-------------+---------------+---------------'&lt;BR /&gt;The K_TYPE, BALANCE and LOCAL_BALANCE is Delivery the expected result. But i do not know why the other 3 columns does not delivery as per expected results.&lt;BR /&gt;Pleas Help!&lt;BR /&gt;Thank you!&lt;/I&gt;</description>
      <pubDate>Tue, 05 Jun 2012 08:02:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317060#M87546</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-05T08:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: tNormalize on 2 columns (or more)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317061#M87547</link>
      <description>Hello All,&lt;BR /&gt;Can anyone please help me to resolve the above issue please~~~&lt;BR /&gt;Thank You!</description>
      <pubDate>Tue, 05 Jun 2012 13:59:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317061#M87547</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-05T13:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: tNormalize on 2 columns (or more)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317062#M87548</link>
      <description>Hi ectl_mun
&lt;BR /&gt;Can you give us an example to explain your request? What's the input data? What are your expected result?
&lt;BR /&gt;Best regards
&lt;BR /&gt;Shong</description>
      <pubDate>Tue, 05 Jun 2012 14:09:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317062#M87548</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-05T14:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: tNormalize on 2 columns (or more)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317063#M87549</link>
      <description>Hi Shong, 
&lt;BR /&gt;I have a ; delimited file with 7 columns, and 6 of the columns is having multivalue delimited by | , the multilvalue column, might have up to 4 values. 
&lt;BR /&gt;My Data: 
&lt;BR /&gt;@ID; K_TYPE; BALANCE; DEBIT_MOVEMENT; CREDIT_MOVEMENT; LOCAL_BALANCE; LOCAL_DEBIT_MVE; 
&lt;BR /&gt;MY0012101; 51001|LIVEDB; -1240.91|-1000000; -221.53|-1700000; |; -3802.83|-3064550; 678.24|-5209735; 
&lt;BR /&gt;My expected result is: 
&lt;BR /&gt;@ID; K_TYPE; BALANCE; DEBIT_MOVEMENT; CREDIT_MOVEMENT; LOCAL_BALANCE; LOCAL_DEBIT_MVE; 
&lt;BR /&gt;MY0012101 51001 -1240.91 -221.53 null -3802.83 -678.24 
&lt;BR /&gt;MY0012101 LIVEDB -1000000 -17000000 null -3064550 -5209735 
&lt;BR /&gt;Please help me!! 
&lt;BR /&gt;Thank You!</description>
      <pubDate>Tue, 05 Jun 2012 14:22:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317063#M87549</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-05T14:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: tNormalize on 2 columns (or more)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317064#M87550</link>
      <description>Hi Shong,
&lt;BR /&gt;Any idea on how i can resolved this issues?
&lt;BR /&gt;Please help!
&lt;BR /&gt;Thank You!</description>
      <pubDate>Thu, 07 Jun 2012 07:43:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317064#M87550</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-07T07:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: tNormalize on 2 columns (or more)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317065#M87551</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Hello Xavier &lt;BR /&gt;You need to write some java code to finish your request. Here is my example:&lt;BR /&gt;Go to Repository--&amp;gt;Code--&amp;gt;and click on the Routine, select 'create routine' option, create a new routine:&lt;BR /&gt;&lt;PRE&gt;package routines;&lt;BR /&gt;public class Forum6748Routine {&lt;BR /&gt;	static java.util.Map&amp;lt;String, String&amp;gt; map = new java.util.HashMap&amp;lt;String, String&amp;gt;();&lt;BR /&gt;	public static String getCol2Value(String col2) {&lt;BR /&gt;		String value = null;&lt;BR /&gt;		String[] array = col2.split(",");&lt;BR /&gt;		for (int i = 0; i &amp;lt; array.length; i++) {&lt;BR /&gt;			String item = array&lt;I&gt;;&lt;BR /&gt;			if ((String) map.get(item) == null) {&lt;BR /&gt;				value = item;&lt;BR /&gt;				map.put(item, item);&lt;BR /&gt;				break;&lt;BR /&gt;			}&lt;BR /&gt;		}&lt;BR /&gt;		return value;&lt;BR /&gt;	}&lt;BR /&gt;}&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;test.csv:&lt;BR /&gt;&lt;B&gt;&lt;BR /&gt;row1;blue,green;1,2&lt;BR /&gt;row2;black,white,red;3,4,5&lt;BR /&gt;row3;butter,charcoal,clay,yellow;6,7,8,9&lt;BR /&gt;&lt;/B&gt;&lt;BR /&gt;result:&lt;BR /&gt;&lt;PRE&gt;Starting job forum6748 at 20:25 25/05/2009.&lt;BR /&gt;.-----+--------+----.&lt;BR /&gt;| &amp;nbsp; &amp;nbsp; tLogRow_1 &amp;nbsp; &amp;nbsp; |&lt;BR /&gt;|=----+--------+---=|&lt;BR /&gt;|rowID|col1 &amp;nbsp; &amp;nbsp;|col2|&lt;BR /&gt;|=----+--------+---=|&lt;BR /&gt;|row1 |blue &amp;nbsp; &amp;nbsp;|1 &amp;nbsp; |&lt;BR /&gt;|row2 |green &amp;nbsp; |2 &amp;nbsp; |&lt;BR /&gt;|row3 |black &amp;nbsp; |3 &amp;nbsp; |&lt;BR /&gt;|row4 |white &amp;nbsp; |4 &amp;nbsp; |&lt;BR /&gt;|row5 |red &amp;nbsp; &amp;nbsp; |5 &amp;nbsp; |&lt;BR /&gt;|row6 |butter &amp;nbsp;|6 &amp;nbsp; |&lt;BR /&gt;|row7 |charcoal|7 &amp;nbsp; |&lt;BR /&gt;|row8 |clay &amp;nbsp; &amp;nbsp;|8 &amp;nbsp; |&lt;BR /&gt;|row9 |yellow &amp;nbsp;|9 &amp;nbsp; |&lt;BR /&gt;'-----+--------+----'&lt;BR /&gt;Job forum6748 ended at 20:25 25/05/2009. &lt;/PRE&gt;&lt;BR /&gt;Let me know if you have any questions!&lt;BR /&gt;Best regards&lt;BR /&gt; &lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;shong&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Hi Shong, 
&lt;BR /&gt;Can you advice more detail how to do this? Should I apply that function with tMap or just use normalize.? 
&lt;BR /&gt;Thank you and Best Regards,</description>
      <pubDate>Tue, 01 Dec 2015 01:47:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317065#M87551</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-01T01:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: tNormalize on 2 columns (or more)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317066#M87552</link>
      <description>Hello narutodc
&lt;BR /&gt;This topic was a little old, in order to follow up your problem well, please report a new topic for your question.
&lt;BR /&gt;Thanks!
&lt;BR /&gt;Shong</description>
      <pubDate>Tue, 01 Dec 2015 03:44:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tNormalize-on-2-columns-or-more/m-p/2317066#M87552</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-01T03:44:24Z</dc:date>
    </item>
  </channel>
</rss>

