<?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: Iterate through columns and create one line per column in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Iterate-through-columns-and-create-one-line-per-column/m-p/2314386#M85159</link>
    <description>Thank you very much,
&lt;BR /&gt;That is exactly what I was looking for</description>
    <pubDate>Fri, 03 May 2013 18:58:07 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2013-05-03T18:58:07Z</dc:date>
    <item>
      <title>Iterate through columns and create one line per column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-through-columns-and-create-one-line-per-column/m-p/2314383#M85156</link>
      <description>The title is a bit confusing 
&lt;BR /&gt;I want to know if it is possible to iterate through the column of a schema and for each pair of column / value create an input line (for a table for exemple) 
&lt;BR /&gt;For exemple, let's say I have a file and the columns are (the schema) : "id, name, price_2013, price_2012, price_2011, ..., price_1990". 
&lt;BR /&gt;And the targeted schema is : Table Object with column id and name, Table Prices with column id_object, year, price 
&lt;BR /&gt;So if in my file I have "3, foo, 12, 14, 11, ..., 20" I should end with the table Object that have one line (id =&amp;gt; 3 and name =&amp;gt; foo) and as many line for the table Prices as the number of price_XXXX 
&lt;BR /&gt;(line 1 : id_object =&amp;gt; 3, year =&amp;gt; 2013, price =&amp;gt; 12 ; line 2 : id_object =&amp;gt; 3, year =&amp;gt; 2012, price =&amp;gt; 14 ; ...) 
&lt;BR /&gt;The table object is ok I already created it and import the id and name but I want to find a way to iterate through the columns "price_XXXX" and create one line per column for the table "Prices" 
&lt;BR /&gt;I saw the iterate link but I don't know how to correctly use it to do what I want to do. 
&lt;BR /&gt;If you have any proposition I will be happy to read it 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Fri, 03 May 2013 15:31:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-through-columns-and-create-one-line-per-column/m-p/2314383#M85156</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-05-03T15:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate through columns and create one line per column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-through-columns-and-create-one-line-per-column/m-p/2314384#M85157</link>
      <description>Hi Clément_d, 
&lt;BR /&gt;I know two ways to achieve your goal. One is to use component tSplitRow and setup the component so that it will do this split in the fields for you. 
&lt;BR /&gt;This solution is hardcoded, I mean, you need manually define year by year how the split must work. 
&lt;BR /&gt;Please check the attached images to see an example. 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEMO.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130428i5ACCB99A21CBB2CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEMO.jpg" alt="0683p000009MEMO.jpg" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEEf.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138585i05B6F9A89233E2C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEEf.jpg" alt="0683p000009MEEf.jpg" /&gt;&lt;/span&gt;</description>
      <pubDate>Fri, 03 May 2013 18:32:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-through-columns-and-create-one-line-per-column/m-p/2314384#M85157</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-03T18:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate through columns and create one line per column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-through-columns-and-create-one-line-per-column/m-p/2314385#M85158</link>
      <description>The other solution involves more code. 
&lt;BR /&gt;Using a tFlowToIterate we can store the row values in the globalMap and then using a tJavaFlex we loop through all the years and get the values. 
&lt;BR /&gt;Please check the attached images to understand. 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MERw.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133889i6742957835BC3F3D/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MERw.jpg" alt="0683p000009MERw.jpg" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009METD.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133751iD3A625C6F5ED115A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009METD.jpg" alt="0683p000009METD.jpg" /&gt;&lt;/span&gt;</description>
      <pubDate>Fri, 03 May 2013 18:36:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-through-columns-and-create-one-line-per-column/m-p/2314385#M85158</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-03T18:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate through columns and create one line per column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-through-columns-and-create-one-line-per-column/m-p/2314386#M85159</link>
      <description>Thank you very much,
&lt;BR /&gt;That is exactly what I was looking for</description>
      <pubDate>Fri, 03 May 2013 18:58:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-through-columns-and-create-one-line-per-column/m-p/2314386#M85159</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-05-03T18:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate through columns and create one line per column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-through-columns-and-create-one-line-per-column/m-p/2314387#M85160</link>
      <description>If you have a lot of columns the mentioned approach are very configuration intensive.&lt;BR /&gt;In Talend Exchange exists a component tNormalizeSchema which can setup a scenario like, normalize the next 100 fields with are occurrence  20 times.</description>
      <pubDate>Fri, 03 May 2013 23:18:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-through-columns-and-create-one-line-per-column/m-p/2314387#M85160</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-05-03T23:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate through columns and create one line per column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-through-columns-and-create-one-line-per-column/m-p/2314388#M85161</link>
      <description>&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;If you have a lot of columns the mentioned approach are very configuration intensive.&lt;BR /&gt;In Talend Exchange exists a component tNormalizeSchema which can setup a scenario like, normalize the next 100 fields with are occurrence 20 times.&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;This component works but this approach seems fine if you have a defined # of columns. Unfortunately doesn't seem to work where the number of columns will vary from row to row.</description>
      <pubDate>Wed, 23 Oct 2013 19:21:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-through-columns-and-create-one-line-per-column/m-p/2314388#M85161</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-10-23T19:21:13Z</dc:date>
    </item>
  </channel>
</rss>

