<?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: tExtractDelimited, tUnpivot, etc... in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tExtractDelimited-tUnpivot-etc/m-p/2241013#M28307</link>
    <description>Hello Lubod, 
&lt;BR /&gt;thank you very much for your answer, it works! Very good trick. 
&lt;BR /&gt;In fact, sometime I have one person per ID, sometime 2, sometime 3 (or more). 
&lt;BR /&gt;The input could be like that: 
&lt;BR /&gt;ID;First_Name;Last_Name;Team 
&lt;BR /&gt;835;Lionel|Cristano;Messi|Ronaldo;Barca|Real 
&lt;BR /&gt;836;Andres|Lionel|Franck;Iniesta|Messi|Ribery;Barca|Barca|Bayern 
&lt;BR /&gt;837;Lionel;Messi;Barca 
&lt;BR /&gt;So I use one tFixedFlowInput (name=two_id) with (0,1), on another (name=three_id) with (0,1,2) 
&lt;BR /&gt;And I choose which one to use with a StringHandling.COUNT. 
&lt;BR /&gt;In the tmap, the function is: 
&lt;BR /&gt;StringHandling.COUNT(First_Name,"|")==0?First_Name: 
&lt;BR /&gt;StringHandling.COUNT(First_Name,"|")==1?First_Name.split("\\|") : 
&lt;BR /&gt;StringHandling.COUNT(row10.First_Name,"|")==2?First_Name.split("\\|") :"more than 3 persons" 
&lt;BR /&gt;I use a tUniqRow after that because I have two many rows (due to the two lookup inputs), but it works. 
&lt;BR /&gt;The job doesn't look so bad, but if I have 10 persons per ID, I have to put 10 lookup outputs, and it will generate a lot of rows before the tUniqRow component! 
&lt;BR /&gt;If you have a better idea, let me know! 
&lt;BR /&gt;thank you again, 
&lt;BR /&gt;Romain</description>
    <pubDate>Fri, 01 Feb 2013 13:24:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-02-01T13:24:27Z</dc:date>
    <item>
      <title>tExtractDelimited, tUnpivot, etc...</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tExtractDelimited-tUnpivot-etc/m-p/2241010#M28304</link>
      <description>Hi,
&lt;BR /&gt;I have an input file like this:
&lt;BR /&gt;ID;First_Name;Last_Name;Team
&lt;BR /&gt;835;Lionel|Cristano;Messi|Ronaldo;Barca|Real
&lt;BR /&gt;836;Andres|Lionel;Iniesta|Messi;Barca|Barca
&lt;BR /&gt;And I'd like to have something like this:
&lt;BR /&gt;ID;First_Name;Last_Name;Team
&lt;BR /&gt;835;Lionel;Messi;Barca
&lt;BR /&gt;835;Cristiano;Ronaldo,Real
&lt;BR /&gt;836;Andres;Iniesta;Barca
&lt;BR /&gt;836;Lionel;Messi;Barca
&lt;BR /&gt;(Just for information, the final goal is to have two tables:
&lt;BR /&gt;-one with the referential of person:
&lt;BR /&gt;ID_Person;Name;Last_Name;Team
&lt;BR /&gt;1;Lionel;Messi;Barca
&lt;BR /&gt;2;Cristiano;Ronaldo,Real
&lt;BR /&gt;3;Andres;Iniesta;Barca
&lt;BR /&gt;-and one with the link ID-ID_Person:
&lt;BR /&gt;ID;ID_Person
&lt;BR /&gt;835;1
&lt;BR /&gt;835;2
&lt;BR /&gt;836;3
&lt;BR /&gt;836;1)
&lt;BR /&gt;I use Talend all the time for my job but I don't manage to do this, I try with tExtractDelimitedFields, tDenormalize and tUnpivot... Anyone could help me?
&lt;BR /&gt;Thank you,
&lt;BR /&gt;Romain</description>
      <pubDate>Mon, 07 Jan 2013 16:48:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tExtractDelimited-tUnpivot-etc/m-p/2241010#M28304</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-07T16:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: tExtractDelimited, tUnpivot, etc...</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tExtractDelimited-tUnpivot-etc/m-p/2241011#M28305</link>
      <description>For information, with 3 tExtractDelimited and 1 tUnpivotRow, I manage to have something like this, but it's not really what I want... :
&lt;BR /&gt;ID;Column1;Column2
&lt;BR /&gt;835;First_Name;Lionel
&lt;BR /&gt;835;First_Name;Cristiano
&lt;BR /&gt;835;Last_Name;Messi
&lt;BR /&gt;835;Last_Name;Ronaldo
&lt;BR /&gt;835;Team;Barca
&lt;BR /&gt;835;Team;Real
&lt;BR /&gt;836;First_Name;Andres
&lt;BR /&gt;836;First_Name;Lionel
&lt;BR /&gt;836;Last_Name;Iniesta
&lt;BR /&gt;836;Last_Name;Messi
&lt;BR /&gt;836;Team;Barca
&lt;BR /&gt;836;Team;Barca</description>
      <pubDate>Mon, 07 Jan 2013 17:00:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tExtractDelimited-tUnpivot-etc/m-p/2241011#M28305</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-07T17:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: tExtractDelimited, tUnpivot, etc...</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tExtractDelimited-tUnpivot-etc/m-p/2241012#M28306</link>
      <description>I would use simple tFileInputDelimited using ";" as a delimiter. 
&lt;BR /&gt;so the schema returns 4 columns 
&lt;BR /&gt;you can now connect the schema to a tMap with a lookup of fixed values (0 and 1) 
&lt;BR /&gt;The lookup must have Load Once and All rows settings with no real join to the main flow.. I am using hardcoded values tFixedFlowInput with schema: Idx, integer 
&lt;BR /&gt;csv.First_Name.split("\\|") - gives me first persons fname for the (0) value of Idx 
&lt;BR /&gt;csv.First_Name.split("\\|") - gives me second persons fname for the (1) value of Idx 
&lt;BR /&gt;apply the same function for Last_Name and Team columns 
&lt;BR /&gt;The lookup will act as a multiplier so if the tMap has 2 main rows from csv and 2 rows from your lookup the output will be 2x2 = 4 
&lt;BR /&gt;if 3 rows from csv the output will be 3x2 = 6 and so on ... 
&lt;BR /&gt;Now it should be easy if you have output with the normalised values: 
&lt;BR /&gt;ID;First_Name;Last_Name;Team 
&lt;BR /&gt;835;Lionel;Messi;Barca 
&lt;BR /&gt;835;Cristiano;Ronaldo,Real 
&lt;BR /&gt;836;Andres;Iniesta;Barca 
&lt;BR /&gt;836;Lionel;Messi;Barca 
&lt;BR /&gt;you can do an insert update on a Person table and than your link table... 
&lt;BR /&gt;Hope you got the idea.</description>
      <pubDate>Tue, 22 Jan 2013 11:40:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tExtractDelimited-tUnpivot-etc/m-p/2241012#M28306</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-22T11:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: tExtractDelimited, tUnpivot, etc...</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tExtractDelimited-tUnpivot-etc/m-p/2241013#M28307</link>
      <description>Hello Lubod, 
&lt;BR /&gt;thank you very much for your answer, it works! Very good trick. 
&lt;BR /&gt;In fact, sometime I have one person per ID, sometime 2, sometime 3 (or more). 
&lt;BR /&gt;The input could be like that: 
&lt;BR /&gt;ID;First_Name;Last_Name;Team 
&lt;BR /&gt;835;Lionel|Cristano;Messi|Ronaldo;Barca|Real 
&lt;BR /&gt;836;Andres|Lionel|Franck;Iniesta|Messi|Ribery;Barca|Barca|Bayern 
&lt;BR /&gt;837;Lionel;Messi;Barca 
&lt;BR /&gt;So I use one tFixedFlowInput (name=two_id) with (0,1), on another (name=three_id) with (0,1,2) 
&lt;BR /&gt;And I choose which one to use with a StringHandling.COUNT. 
&lt;BR /&gt;In the tmap, the function is: 
&lt;BR /&gt;StringHandling.COUNT(First_Name,"|")==0?First_Name: 
&lt;BR /&gt;StringHandling.COUNT(First_Name,"|")==1?First_Name.split("\\|") : 
&lt;BR /&gt;StringHandling.COUNT(row10.First_Name,"|")==2?First_Name.split("\\|") :"more than 3 persons" 
&lt;BR /&gt;I use a tUniqRow after that because I have two many rows (due to the two lookup inputs), but it works. 
&lt;BR /&gt;The job doesn't look so bad, but if I have 10 persons per ID, I have to put 10 lookup outputs, and it will generate a lot of rows before the tUniqRow component! 
&lt;BR /&gt;If you have a better idea, let me know! 
&lt;BR /&gt;thank you again, 
&lt;BR /&gt;Romain</description>
      <pubDate>Fri, 01 Feb 2013 13:24:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tExtractDelimited-tUnpivot-etc/m-p/2241013#M28307</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-02-01T13:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: tExtractDelimited, tUnpivot, etc...</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tExtractDelimited-tUnpivot-etc/m-p/2241014#M28308</link>
      <description>What I ment was just one lookup with multiple rows.
&lt;BR /&gt;You could either have tFixedFlow with fixed number of rows or use tRowGenerator to generate required number of rows.
&lt;BR /&gt;
&lt;BR /&gt;This transformation would be executed for all values/numbers returned by your lookup.
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;csv.First_Name.split("\\|") &lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 14 Feb 2013 14:12:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tExtractDelimited-tUnpivot-etc/m-p/2241014#M28308</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-02-14T14:12:11Z</dc:date>
    </item>
  </channel>
</rss>

