<?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: Converting one-to-many database row into XML data in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Converting-one-to-many-database-row-into-XML-data/m-p/2320246#M90407</link>
    <description>I tried it again and found that the issue I mentioned above was caused by my splitting up each XML record into separate file. Once I combine them into one XML in tAdvancedFileOuptutXML setting, it works perfectly. 
&lt;BR /&gt;Thanks a lot!</description>
    <pubDate>Sat, 07 Sep 2013 22:41:20 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-09-07T22:41:20Z</dc:date>
    <item>
      <title>Converting one-to-many database row into XML data</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-one-to-many-database-row-into-XML-data/m-p/2320243#M90404</link>
      <description>I have a database with the following tables:&lt;BR /&gt;OBJECT_MAIN&lt;BR /&gt;object_id           |         title &lt;BR /&gt;98                     |      beads&lt;BR /&gt;99                     |      plates&lt;BR /&gt;100                   |       bronze&lt;BR /&gt;OBJECT_REGION&lt;BR /&gt;object_id           |       region&lt;BR /&gt;98                     |       egypt&lt;BR /&gt;98                     |      alexandria&lt;BR /&gt;99                     |       greek&lt;BR /&gt;I would like to convert each object data into a XML file with&lt;BR /&gt;&amp;lt;culture_object object_id="98"&amp;gt;&lt;BR /&gt;     &amp;lt;title&amp;gt;beads&amp;lt;/title&amp;gt;&lt;BR /&gt;     &amp;lt;region&amp;gt;&lt;BR /&gt;        &amp;lt;location&amp;gt;egypt&amp;lt;/location&amp;gt;&lt;BR /&gt;        &amp;lt;location&amp;gt;alexandria&amp;lt;/location&amp;gt;&lt;BR /&gt;    &amp;lt;/region&amp;gt;&lt;BR /&gt;&amp;lt;/culture_object&amp;gt;&lt;BR /&gt;Here is what I did:&lt;BR /&gt;I used two tMySQL input source for the two table and linked to tMap with Main and Lookup (join by object_id).&lt;BR /&gt;But, it shows only first region, not the second, and it does not show item 100.&lt;BR /&gt;How can I map multiple regions of the row into the XML file?</description>
      <pubDate>Tue, 03 Sep 2013 21:59:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-one-to-many-database-row-into-XML-data/m-p/2320243#M90404</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-03T21:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Converting one-to-many database row into XML data</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-one-to-many-database-row-into-XML-data/m-p/2320244#M90405</link>
      <description>Hi Venturi, 
&lt;BR /&gt;You need to select "All matches" in the component called tMap for the Match Model option (see screenshot : tMap.png). 
&lt;BR /&gt;As you can see your Job should look like the one attached in the screenshot Job.png (disregard the components used for the input since I don't have your MySQL table; so I fake it with your sample data and the tFixedFlow components). 
&lt;BR /&gt;You need also to pay attention to the configuration of the component tAdvancedXMLOutput to have the same expected result as mentioned above in your Post (see screenshot : tAdvancedXML.png). 
&lt;BR /&gt;Let me know if that helps. 
&lt;BR /&gt;Thanks. 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MB6M.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144158i3783040EDCBECBD1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MB6M.png" alt="0683p000009MB6M.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MB6R.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134440i7161C05EAEF387CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MB6R.png" alt="0683p000009MB6R.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MB4M.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138388i5D7B03F5CB981DD1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MB4M.png" alt="0683p000009MB4M.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Wed, 04 Sep 2013 20:11:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-one-to-many-database-row-into-XML-data/m-p/2320244#M90405</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-04T20:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Converting one-to-many database row into XML data</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-one-to-many-database-row-into-XML-data/m-p/2320245#M90406</link>
      <description>cantoine, 
&lt;BR /&gt;Thanks you very much for the help. 
&lt;BR /&gt;I tried exactly as you did with tMap setting and the output XML setting. 
&lt;BR /&gt;However, I got four records instead of three. 
&lt;BR /&gt;The record 98 is created with two XML records: one with the first location, the other with the second location. I was hoping that it will put both "region" fields in the same "region" tag as two child "location" tag in one XML record instead of splitting them into two separate files. 
&lt;BR /&gt;That is instead of 
&lt;BR /&gt; 
&lt;PRE&gt;&amp;lt;root&amp;gt;&lt;BR /&gt;  &amp;lt;culture_object object_id="98"&amp;gt;&lt;BR /&gt;    &amp;lt;title&amp;gt;beads&amp;lt;/title&amp;gt;&lt;BR /&gt;    &amp;lt;region&amp;gt;&lt;BR /&gt;      &amp;lt;location&amp;gt;egypt&amp;lt;/location&amp;gt;&lt;BR /&gt;    &amp;lt;/region&amp;gt;&lt;BR /&gt;  &amp;lt;/culture_object&amp;gt;&lt;BR /&gt;&amp;lt;/root&amp;gt;&lt;BR /&gt;&amp;lt;root&amp;gt;&lt;BR /&gt;  &amp;lt;culture_object object_id="98"&amp;gt;&lt;BR /&gt;    &amp;lt;title&amp;gt;beads&amp;lt;/title&amp;gt;&lt;BR /&gt;    &amp;lt;region&amp;gt;&lt;BR /&gt;      &amp;lt;location&amp;gt;alexandria&amp;lt;/location&amp;gt;&lt;BR /&gt;    &amp;lt;/region&amp;gt;&lt;BR /&gt;  &amp;lt;/culture_object&amp;gt;&lt;BR /&gt;&amp;lt;/root&amp;gt;&lt;/PRE&gt; 
&lt;BR /&gt;It should be 
&lt;BR /&gt; 
&lt;PRE&gt;&amp;lt;root&amp;gt;&lt;BR /&gt;  &amp;lt;culture_object object_id="98"&amp;gt;&lt;BR /&gt;    &amp;lt;title&amp;gt;beads&amp;lt;/title&amp;gt;&lt;BR /&gt;    &amp;lt;region&amp;gt;&lt;BR /&gt;      &amp;lt;location&amp;gt;egypt&amp;lt;/location&amp;gt;&lt;BR /&gt;      &amp;lt;location&amp;gt;alexandria&amp;lt;/location&amp;gt;&lt;BR /&gt;    &amp;lt;/region&amp;gt;&lt;BR /&gt;  &amp;lt;/culture_object&amp;gt;&lt;BR /&gt;&amp;lt;/root&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 07 Sep 2013 22:26:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-one-to-many-database-row-into-XML-data/m-p/2320245#M90406</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-07T22:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: Converting one-to-many database row into XML data</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-one-to-many-database-row-into-XML-data/m-p/2320246#M90407</link>
      <description>I tried it again and found that the issue I mentioned above was caused by my splitting up each XML record into separate file. Once I combine them into one XML in tAdvancedFileOuptutXML setting, it works perfectly. 
&lt;BR /&gt;Thanks a lot!</description>
      <pubDate>Sat, 07 Sep 2013 22:41:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-one-to-many-database-row-into-XML-data/m-p/2320246#M90407</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-07T22:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Converting one-to-many database row into XML data</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-one-to-many-database-row-into-XML-data/m-p/2320247#M90408</link>
      <description>cantoine, 
&lt;BR /&gt;Is there anyway to combine the child tags in a single XML file as I described above to output each record as separate XML file. Right now it produces multiple XML files for based child tag.</description>
      <pubDate>Fri, 13 Sep 2013 01:01:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-one-to-many-database-row-into-XML-data/m-p/2320247#M90408</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-13T01:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Converting one-to-many database row into XML data</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-one-to-many-database-row-into-XML-data/m-p/2320248#M90409</link>
      <description>Hi venturi
&lt;BR /&gt;Add a tFlowToIterate between tMap and tAdvancedXMLOutput to iterate each record and set a dynamic output file path on tAdvancedXMLOutput, for example.
&lt;BR /&gt;...tMap---out1--&amp;gt;tFlowToIterate--iterate--&amp;gt;tFixedFlowInput--main--tAdvancedXMLOutput 
&lt;BR /&gt;on tFixedFlowInput: generate the current data flow, for example: define the following columns on the schema:
&lt;BR /&gt;column: value
&lt;BR /&gt;object_id (Integer/int type): (Integer)globalMap.get("out1.object_id")
&lt;BR /&gt;title (string type): (String)globalMap.get("out1.title")
&lt;BR /&gt;region( string type): (String)globalMap.get("out1.region")
&lt;BR /&gt;On tAdvancedOutputXML, set a dynamic file path so as to generate a separater XML file for each record, for example:
&lt;BR /&gt;"D:/file/"+(String)globalMap.get("out1.region")+".xml"
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 13 Sep 2013 03:15:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-one-to-many-database-row-into-XML-data/m-p/2320248#M90409</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-13T03:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Converting one-to-many database row into XML data</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-one-to-many-database-row-into-XML-data/m-p/2320249#M90410</link>
      <description>&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;I have another doubt.. How to apply "ALL in One" property in tWriteJSONField.. I know about tXMLMap but I want to perform this property with tWriteJSONField.. so please explain with example. I am beginner in Talend&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Wed, 28 Oct 2015 04:32:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-one-to-many-database-row-into-XML-data/m-p/2320249#M90410</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-28T04:32:44Z</dc:date>
    </item>
  </channel>
</rss>

