<?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: Split csv into many xml in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Split-csv-into-many-xml/m-p/2339768#M107863</link>
    <description>&lt;P&gt;Hi TRF&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, thats works (I suspected something like this). But this solution has an inconvenience because I need to maintain not only the schema which I can put in repository, but also a tFixedFlowInput component&amp;nbsp;mapping where I need to map each column to corresponding global value... This looks like a&amp;nbsp;tautology - column1 = (String)globalMap.get("row1.column1"). And the same for all columns,&amp;nbsp; there are many....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any solution for that?&lt;/P&gt;</description>
    <pubDate>Sun, 04 Feb 2018 22:50:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-02-04T22:50:33Z</dc:date>
    <item>
      <title>Split csv into many xml</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Split-csv-into-many-xml/m-p/2339766#M107861</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I have a csv file and I need to create separate xml files for each row, name of each xml file should match to the value of some column in csv.&lt;/P&gt;
&lt;P&gt;Sounds easy but I cannot figured out how to do it...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've made following job and in tFileOutputXML component I selected "Split output in several files" and "Rows in each output file - 1":&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 493px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lstg.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135750i0F652AAE8A0C780E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lstg.jpg" alt="0683p000009Lstg.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I try to use "row1.columnName" as a file name in &lt;SPAN&gt;tFileOutputXML&amp;nbsp;&lt;/SPAN&gt;but it doesnt work - files named as null1.xml, null2.xml, etc. As I understad this is because Output component is initialized once at the beginning of the job, when no data read from csv yet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I acheeve what I need?&lt;/P&gt;</description>
      <pubDate>Sun, 04 Feb 2018 19:21:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Split-csv-into-many-xml/m-p/2339766#M107861</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-04T19:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Split csv into many xml</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Split-csv-into-many-xml/m-p/2339767#M107862</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;That's because output files are opened when subjob starts.&lt;/P&gt; 
&lt;P&gt;Use the following design:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;tFileInputDelimited--&amp;gt;tFlowToIterate--iterate--&amp;gt;tFixedFlowInput--&amp;gt;tFileOutputXML&lt;/PRE&gt; 
&lt;P&gt;tFlowToIterate transform each field of the current row to a global variable.&lt;/P&gt; 
&lt;P&gt;The "iterate" connection trnasform the flow to an iteration (for simple, you may consider it like a separate subjob).&lt;/P&gt; 
&lt;P&gt;tFixedFlowInput start a new flow using the global variables to initialize the fields, like this:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 727px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LsWy.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139826i32267845CDAAB05C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LsWy.png" alt="0683p000009LsWy.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;This flow is pushed to tFileOutputXML where you can reuse the global which contained the file name like this:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;"C:/Users/offic/Desktop/TestTalend/"+(String)globalMap.get("row57.newColumn")+".xml"&lt;/PRE&gt; 
&lt;P&gt;&lt;SPAN&gt;Hope this heps.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Feb 2018 20:37:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Split-csv-into-many-xml/m-p/2339767#M107862</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-02-04T20:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Split csv into many xml</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Split-csv-into-many-xml/m-p/2339768#M107863</link>
      <description>&lt;P&gt;Hi TRF&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, thats works (I suspected something like this). But this solution has an inconvenience because I need to maintain not only the schema which I can put in repository, but also a tFixedFlowInput component&amp;nbsp;mapping where I need to map each column to corresponding global value... This looks like a&amp;nbsp;tautology - column1 = (String)globalMap.get("row1.column1"). And the same for all columns,&amp;nbsp; there are many....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any solution for that?&lt;/P&gt;</description>
      <pubDate>Sun, 04 Feb 2018 22:50:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Split-csv-into-many-xml/m-p/2339768#M107863</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-04T22:50:33Z</dc:date>
    </item>
  </channel>
</rss>

