<?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: Talend Data Mapper - No examples of a flat file to complex XML in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Talend-Data-Mapper-No-examples-of-a-flat-file-to-complex-XML/m-p/2248636#M33430</link>
    <description>Hi,&lt;BR /&gt;In topic , you will find a solution to make your flat structure an XML looping structure.&lt;BR /&gt;Eric</description>
    <pubDate>Sat, 22 Oct 2016 08:24:49 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2016-10-22T08:24:49Z</dc:date>
    <item>
      <title>Talend Data Mapper - No examples of a flat file to complex XML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-Data-Mapper-No-examples-of-a-flat-file-to-complex-XML/m-p/2248633#M33427</link>
      <description>Hi I have been working on a flat file to complex XML structure with nested loops. My flat file has all of the data in a format which means there is a lot of replication. SO for every field in the XML document, there is a column in my flat file. This means that fields that occur once in the XML are repeated in the flat file for every loop that occurs in the XML. See below for a very basic example.....
&lt;BR /&gt;Expected XML
&lt;BR /&gt;&amp;lt;xml&amp;gt;
&lt;BR /&gt;&amp;lt;head1&amp;gt;head1&amp;lt;/head1&amp;gt;
&lt;BR /&gt;&amp;lt;head2&amp;gt;head2&amp;lt;/head2&amp;gt;
&lt;BR /&gt;&amp;lt;loop1&amp;gt;
&lt;BR /&gt;&amp;lt;data&amp;gt;
&lt;BR /&gt;&amp;lt;value1&amp;gt;value1a&amp;lt;/value1&amp;gt;
&lt;BR /&gt;&amp;lt;loop2&amp;gt;
&lt;BR /&gt;&amp;lt;value2&amp;gt;value2a&amp;lt;/value2&amp;gt;
&lt;BR /&gt;&amp;lt;value2&amp;gt;value2b&amp;lt;/value2&amp;gt;
&lt;BR /&gt;&amp;lt;value2&amp;gt;value2c&amp;lt;/value2&amp;gt;
&lt;BR /&gt;&amp;lt;/loop2&amp;gt;
&lt;BR /&gt;&amp;lt;/data&amp;gt;
&lt;BR /&gt;&amp;lt;data&amp;gt;
&lt;BR /&gt;&amp;lt;value1&amp;gt;value1b&amp;lt;/value1&amp;gt;
&lt;BR /&gt;&amp;lt;loop2&amp;gt;
&lt;BR /&gt;&amp;lt;value2&amp;gt;value2d&amp;lt;/value2&amp;gt;
&lt;BR /&gt;&amp;lt;value2&amp;gt;value2e&amp;lt;/value2&amp;gt;
&lt;BR /&gt;&amp;lt;value2&amp;gt;value2f&amp;lt;/value2&amp;gt;
&lt;BR /&gt;&amp;lt;/loop2&amp;gt;
&lt;BR /&gt;&amp;lt;/data&amp;gt;
&lt;BR /&gt;&amp;lt;/loop1&amp;gt;
&lt;BR /&gt;&amp;lt;/xml&amp;gt;
&lt;BR /&gt;Source File
&lt;BR /&gt;head1,head2,value1a,value2a
&lt;BR /&gt;head1,head2,value1a,value2b
&lt;BR /&gt;head1,head2,value1a,value2c
&lt;BR /&gt;head1,head2,value1b,value2d
&lt;BR /&gt;head1,head2,value1b,value2e
&lt;BR /&gt;head1,head2,value1b,value2f
&lt;BR /&gt;
&lt;BR /&gt;I also have to enable several documents to be produced. So if you take the example above and add another column which would indicate a new file. For example....
&lt;BR /&gt;file1,head1,head2,value1a,value2a
&lt;BR /&gt;file1,head1,head2,value1a,value2b
&lt;BR /&gt;file1,head1,head2,value1a,value2c
&lt;BR /&gt;file1,head1,head2,value1b,value2d
&lt;BR /&gt;file1,head1,head2,value1b,value2e
&lt;BR /&gt;file1,head1,head2,value1b,value2f
&lt;BR /&gt;file2,head3,head4,value1a,value2a
&lt;BR /&gt;file2,head3,head4,value1a,value2b
&lt;BR /&gt;file2,head3,head4,value1a,value2c
&lt;BR /&gt;file2,head3,head4,value1b,value2d
&lt;BR /&gt;file2,head3,head4,value1b,value2e
&lt;BR /&gt;file2,head3,head4,value1b,value2f
&lt;BR /&gt;Now the problem I have is that the Data Mapper is useless. OK, it might not be useless, but it is really badly documented, is not consistent with the rest of the tool, does not use the same terminology, does not use the same way of working, and errors with every attempt to get it to work. I have to say that I am tempted to just use JAXB to do this, but thought I would&amp;nbsp;persevere. The big problem I have is that it falls over with looping issues on data that is not supposed to loop. So, because my headers (head1, head2, etc) are repeated with every row, I have to find a way of saying that I only want 1 value per group (lets say the group key is "file" for this). But there doesn't appear to be a function which does this....or at least they are not named in any way to aid in discovery. I am also wanting to produce multiple XML files (based on the "file" field) and everything I have read about this makes about as much sense as a toddler trying to read Chaucer.
&lt;BR /&gt;As you can tell, I am literally pulling my hair out here trying to do something that should be simple, should be a standard example and should have loads of examples online. But there is absolutely nothing to crib from. All of the examples using XML are reading from XML to another format and the example structures are so simple, there is no real need for the examples. So, does anyone know of any examples, maybe have an example they could send me, or maybe know of decent tutorial which explains this? Or do I have to use JAXB and code it in Java?</description>
      <pubDate>Tue, 11 Oct 2016 00:24:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-Data-Mapper-No-examples-of-a-flat-file-to-complex-XML/m-p/2248633#M33427</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2016-10-11T00:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Talend Data Mapper - No examples of a flat file to complex XML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-Data-Mapper-No-examples-of-a-flat-file-to-complex-XML/m-p/2248634#M33428</link>
      <description>Hello,&lt;BR /&gt;We have redirected your issue to our TDM expert and then come back to you as soon as we can.&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
      <pubDate>Fri, 14 Oct 2016 08:33:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-Data-Mapper-No-examples-of-a-flat-file-to-complex-XML/m-p/2248634#M33428</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-14T08:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Talend Data Mapper - No examples of a flat file to complex XML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-Data-Mapper-No-examples-of-a-flat-file-to-complex-XML/m-p/2248635#M33429</link>
      <description>I am working on a similar requirement, &amp;nbsp;trying to create a json document with nested arrays instead of XML.&amp;nbsp;Data mapper documentation is not great. It would be great if some from Talend provide an example or solution for this issue.</description>
      <pubDate>Tue, 18 Oct 2016 21:52:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-Data-Mapper-No-examples-of-a-flat-file-to-complex-XML/m-p/2248635#M33429</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2016-10-18T21:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Talend Data Mapper - No examples of a flat file to complex XML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-Data-Mapper-No-examples-of-a-flat-file-to-complex-XML/m-p/2248636#M33430</link>
      <description>Hi,&lt;BR /&gt;In topic , you will find a solution to make your flat structure an XML looping structure.&lt;BR /&gt;Eric</description>
      <pubDate>Sat, 22 Oct 2016 08:24:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-Data-Mapper-No-examples-of-a-flat-file-to-complex-XML/m-p/2248636#M33430</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2016-10-22T08:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Talend Data Mapper - No examples of a flat file to complex XML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-Data-Mapper-No-examples-of-a-flat-file-to-complex-XML/m-p/2248637#M33431</link>
      <description>Hi,&lt;BR /&gt;In topic &lt;B&gt;51290&lt;/B&gt;, you will find a solution to make your flat structure an XML looping structure.&lt;BR /&gt;Eric</description>
      <pubDate>Sat, 22 Oct 2016 08:26:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-Data-Mapper-No-examples-of-a-flat-file-to-complex-XML/m-p/2248637#M33431</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2016-10-22T08:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: Talend Data Mapper - No examples of a flat file to complex XML</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-Data-Mapper-No-examples-of-a-flat-file-to-complex-XML/m-p/2248638#M33432</link>
      <description>&lt;P&gt;Trying to find examples too, to generate XML (or JSON) file from a database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is someone knows how to simulate arrays/loops with TDM ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not talking about simple generation but with many loops and sub-loops.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks by advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Nov 2022 15:00:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-Data-Mapper-No-examples-of-a-flat-file-to-complex-XML/m-p/2248638#M33432</guid>
      <dc:creator>manuk1</dc:creator>
      <dc:date>2022-11-13T15:00:35Z</dc:date>
    </item>
  </channel>
</rss>

