<?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: how to transpose a table? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/how-to-transpose-a-table/m-p/2242356#M29220</link>
    <description>i use java, and my data is not dynamic, thanks in advance</description>
    <pubDate>Thu, 11 Sep 2008 21:58:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-09-11T21:58:21Z</dc:date>
    <item>
      <title>how to transpose a table?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-transpose-a-table/m-p/2242354#M29218</link>
      <description>hi,&lt;BR /&gt;this is my input table:&lt;BR /&gt;h1, val1a, val2a, valNa&lt;BR /&gt;h2, val1b, val2b, valNb&lt;BR /&gt;h3, val1c, val2c, valNc&lt;BR /&gt;&lt;BR /&gt;i want this output table:&lt;BR /&gt;h1, h2, h3&lt;BR /&gt;val1a, val1b, val1c&lt;BR /&gt;val2a, val2b, val2c&lt;BR /&gt;valNa, valNb, valNc&lt;BR /&gt;&lt;BR /&gt;is there any simple or complicated way to do this?&lt;BR /&gt;my input is an excel file, and my output is a sql server table. I can put the excel in a delimited text file if it's necessary.&lt;BR /&gt;many thanks.</description>
      <pubDate>Sat, 16 Nov 2024 14:13:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-transpose-a-table/m-p/2242354#M29218</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T14:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to transpose a table?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-transpose-a-table/m-p/2242355#M29219</link>
      <description>Hi, &lt;BR /&gt;which generation language do you use? Is your data dynamic (if so in which directions)?&lt;BR /&gt;Bye&lt;BR /&gt;Volker</description>
      <pubDate>Thu, 11 Sep 2008 21:33:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-transpose-a-table/m-p/2242355#M29219</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-11T21:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to transpose a table?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-transpose-a-table/m-p/2242356#M29220</link>
      <description>i use java, and my data is not dynamic, thanks in advance</description>
      <pubDate>Thu, 11 Sep 2008 21:58:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-transpose-a-table/m-p/2242356#M29220</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-11T21:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to transpose a table?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-transpose-a-table/m-p/2242357#M29221</link>
      <description>Not so easy... 
&lt;BR /&gt;The problem is that you should first read all rows and then you can create the output. So you have to read your data multiple times. 
&lt;BR /&gt;One idea: 
&lt;BR /&gt;Create a fix flow with only one attribute: a sequence number starting with null. Than you iterate over the same file and read for every row the nth value. To extract this you can use split in java for example. 
&lt;BR /&gt;One night later another (i find better) idea: 
&lt;BR /&gt;a) Read your data row by row with all columns in one attribute (for example use tFileInputRegex with "^(.*)$") 
&lt;BR /&gt;b) In a tMap add a sequence to your data 
&lt;BR /&gt;c) use tDeNormalize to break down your data. 
&lt;BR /&gt;d) Use another tMap to add a second sequence. Set the sequence key to the first sequence created in b) 
&lt;BR /&gt;You should now have now the following: 
&lt;BR /&gt;1, 1, h1 
&lt;BR /&gt;1, 2, val1a 
&lt;BR /&gt;1, 3, val2a 
&lt;BR /&gt;1, 4, valNa 
&lt;BR /&gt;2, 1, h2 
&lt;BR /&gt;2, 2, val1b 
&lt;BR /&gt;e) Now go the same way back with changed sequence keys: sort your data on the second sequence, remove the first and use tNormalize to bring all together. 
&lt;BR /&gt;Now you have: 
&lt;BR /&gt;1, "h1, h2, h3" 
&lt;BR /&gt;2, "val1a, val1b, val1c" 
&lt;BR /&gt;We are now back on step a) but with transposed data. You can now save this and read it again or use java code to get the values (split for example). 
&lt;BR /&gt;Bye 
&lt;BR /&gt;Volker</description>
      <pubDate>Thu, 11 Sep 2008 22:06:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-transpose-a-table/m-p/2242357#M29221</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-11T22:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to transpose a table?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-transpose-a-table/m-p/2242358#M29222</link>
      <description>thank you very much, it works.. but &lt;BR /&gt;c) i have to use a tNormalize&lt;BR /&gt;e) i have to use a tDeNormalize&lt;BR /&gt;bye&lt;BR /&gt;Daniele.</description>
      <pubDate>Fri, 12 Sep 2008 16:13:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-transpose-a-table/m-p/2242358#M29222</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-12T16:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to transpose a table?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-transpose-a-table/m-p/2242359#M29223</link>
      <description>Yes you are right. I mixed them...&lt;BR /&gt;Bye&lt;BR /&gt;Volker</description>
      <pubDate>Fri, 12 Sep 2008 21:33:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-transpose-a-table/m-p/2242359#M29223</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-12T21:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to transpose a table?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-transpose-a-table/m-p/2242360#M29224</link>
      <description>Or you can check the ecosystem and find the dedicated component</description>
      <pubDate>Mon, 15 Sep 2008 09:56:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-transpose-a-table/m-p/2242360#M29224</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-09-15T09:56:30Z</dc:date>
    </item>
  </channel>
</rss>

