<?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: Building a cross table in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Building-a-cross-table/m-p/2344649#M112281</link>
    <description>sure! 
&lt;BR /&gt; 
&lt;BR /&gt;this solution is a little hacky, and there are many ways to piviot data with Talend so maybe some other Guru's can weigh in with different solutions. 
&lt;BR /&gt;I've set up the test data like this: 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MH5C.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133118i57C85A20FDCD01CC/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MH5C.png" alt="0683p000009MH5C.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;The tMap is where the most of the magic happens. 
&lt;BR /&gt;I take all of the "data columns" and add their name, a comma, then the value followed by a semicolon: 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;"newColumn" + "," + row1.newColumn + ";" + &lt;BR /&gt;"newColumn1" + "," + row1.newColumn1 + ";" + &lt;BR /&gt;"newColumn2" + "," + row1.newColumn2 + ";" + &lt;BR /&gt;"newColumn3" + "," + row1.newColumn3+ ";" + &lt;BR /&gt;"newColumn4" + "," + row1.newColumn4+ ";" + &lt;BR /&gt;"newColumn5" + "," + row1.newColumn5+ ";" + &lt;BR /&gt;"newColumn6" + "," + row1.newColumn6+ ";" + &lt;BR /&gt;"newColumn7" + "," + row1.newColumn7+ ";" + &lt;BR /&gt;"newColumn8" + "," + row1.newColumn8+ ";" + &lt;BR /&gt;"newColumn9" + "," + row1.newColumn9+ ";" + &lt;BR /&gt;"newColumn10" + "," + row1.newColumn10 &lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MH9a.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130419i4172983D103D51FE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MH9a.png" alt="0683p000009MH9a.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Then I use a tNormalize to pivot the data columns on semicolon: 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MGxY.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130582iAE8642B48F2EE49E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MGxY.png" alt="0683p000009MGxY.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Followed by a tExtractDelimitedFields to split out the name from the data values. Note you need to change the output schema of this component to make room for the split out columns: 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MGuN.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145225i3826FB9BB798C828/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MGuN.png" alt="0683p000009MGuN.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;finally I print out the data giving what we want: 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MH9f.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148270i591CB1DE738A5DD8/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MH9f.png" alt="0683p000009MH9f.png" /&gt;&lt;/span&gt;</description>
    <pubDate>Thu, 25 Feb 2016 16:37:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-02-25T16:37:45Z</dc:date>
    <item>
      <title>Building a cross table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Building-a-cross-table/m-p/2344648#M112280</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;i have a csv file in the following format:&lt;BR /&gt;Header key1,key2,key3,column1,column2,....,column10&lt;BR /&gt;Data&amp;nbsp;&lt;BR /&gt;key1_line_1_data,key2_line_1_data,key3_line_1_data,column1_line_1_data,column2_line_1_data,....,column10_line_1_data&lt;BR /&gt;key1_line_2_data,key2_line_2_data,key3_line_2_data,column1_line_2_data,column2_line_2_data,....,column10_line_2_data&lt;BR /&gt;i want to transform the file so that the endresult should look like&lt;BR /&gt;key1,key2,key2,column,data&lt;BR /&gt;key1_line_1_data,key2_line_1_data,key3_line_1_data,column_1,column1_line_1_data&lt;BR /&gt;key1_line_1_data,key2_line_1_data,key3_line_1_data,column_2,column2_line_1_data&lt;BR /&gt;...&lt;BR /&gt;key1_line_1_data,key2_line_1_data,key3_line_1_data,column_10,column10_line_1_data&lt;BR /&gt;key1_line_2_data,key2_line_2_data,key3_line_2_data,column_1,column1_line_2_data&lt;BR /&gt;....&lt;BR /&gt;&lt;BR /&gt;Is it possible to archive this transformation with Talend components and if yes how or have i code it manually? The reason why i am not using a tsplitrow component is, that the column name could vary.&lt;BR /&gt;Thanks for helping,&lt;BR /&gt;Alexander Stautner&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 10:32:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Building-a-cross-table/m-p/2344648#M112280</guid>
      <dc:creator>stautner_a</dc:creator>
      <dc:date>2016-02-25T10:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Building a cross table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Building-a-cross-table/m-p/2344649#M112281</link>
      <description>sure! 
&lt;BR /&gt; 
&lt;BR /&gt;this solution is a little hacky, and there are many ways to piviot data with Talend so maybe some other Guru's can weigh in with different solutions. 
&lt;BR /&gt;I've set up the test data like this: 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MH5C.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133118i57C85A20FDCD01CC/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MH5C.png" alt="0683p000009MH5C.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;The tMap is where the most of the magic happens. 
&lt;BR /&gt;I take all of the "data columns" and add their name, a comma, then the value followed by a semicolon: 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;"newColumn" + "," + row1.newColumn + ";" + &lt;BR /&gt;"newColumn1" + "," + row1.newColumn1 + ";" + &lt;BR /&gt;"newColumn2" + "," + row1.newColumn2 + ";" + &lt;BR /&gt;"newColumn3" + "," + row1.newColumn3+ ";" + &lt;BR /&gt;"newColumn4" + "," + row1.newColumn4+ ";" + &lt;BR /&gt;"newColumn5" + "," + row1.newColumn5+ ";" + &lt;BR /&gt;"newColumn6" + "," + row1.newColumn6+ ";" + &lt;BR /&gt;"newColumn7" + "," + row1.newColumn7+ ";" + &lt;BR /&gt;"newColumn8" + "," + row1.newColumn8+ ";" + &lt;BR /&gt;"newColumn9" + "," + row1.newColumn9+ ";" + &lt;BR /&gt;"newColumn10" + "," + row1.newColumn10 &lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MH9a.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130419i4172983D103D51FE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MH9a.png" alt="0683p000009MH9a.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Then I use a tNormalize to pivot the data columns on semicolon: 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MGxY.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130582iAE8642B48F2EE49E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MGxY.png" alt="0683p000009MGxY.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Followed by a tExtractDelimitedFields to split out the name from the data values. Note you need to change the output schema of this component to make room for the split out columns: 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MGuN.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145225i3826FB9BB798C828/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MGuN.png" alt="0683p000009MGuN.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;finally I print out the data giving what we want: 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MH9f.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148270i591CB1DE738A5DD8/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MH9f.png" alt="0683p000009MH9f.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Thu, 25 Feb 2016 16:37:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Building-a-cross-table/m-p/2344649#M112281</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-25T16:37:45Z</dc:date>
    </item>
  </channel>
</rss>

