• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Usage tXmlMap - xml output with different Branches - multiple loop

#1 2012-07-23 12:41:00

fgarzon
Member
Registered: 2010-04-06
Posts: 21

Usage tXmlMap - xml output with different Branches - multiple loop

Hello,
I would like your help with the usage of tXmlMap. I'l explain what I have (in tems of database) and what I want as an xml result. I'l use a simpler db to make the case more clear.
I have 3 tables:
Orders table
ID
11
12

OrderItems Table
ID     Item
11     001
11     002
12     001
12     002
12     003

OrderPartners table
ID    Partner
11    Sold-to-Party
11    Bill-to-Party
11    Ship-to-Party
12    Sold-to-Party
12    Bill-to-Party


I need the following xml output


<?xml version="1.0"?>
<orders>
  <order>
    <id>11</id>
    <orderItems>
      <orderItem item="001"/>
      <orderItem item="002"/>
    </orderItems>
    <orderPartnerRoles>
      <orderPartnerRole partner="Sold-to-Party"/>
      <orderPartnerRole partner="Bill-to-Party"/>
      <orderPartnerRole partner="Ship-to-Party"/>
    </orderPartnerRoles>
  </order>
  <order>
    <id>12</id>
    <orderItems>
      <orderItem item="001"/>
      <orderItem item="002"/>
      <orderItem item="003"/>
    </orderItems>
    <orderPartnerRoles>
      <orderPartnerRole partner="Sold-to-Party"/>
      <orderPartnerRole partner="Bill-to-Party"/>
      </orderPartnerRoles>
   </order>
</orders>

I have built the job i have attached but it didn't work as i expect. I need a clue.

Thank you all.


Uploaded Images

Offline

#2 2012-07-24 03:57:57

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: Usage tXmlMap - xml output with different Branches - multiple loop

Hi

According to your description, please try with tFileOutputMSXML which supports mutli loop.
I'm sure it will work fine.

Regards,
Pedro


Only Paranoid Survive.

Offline

#3 2012-07-24 13:34:10

fgarzon
Member
Registered: 2010-04-06
Posts: 21

Re: Usage tXmlMap - xml output with different Branches - multiple loop

Thank you very much. I modified the job and now it produces the xml with multiple loop.

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Usage tXmlMap - xml output with different Branches - multiple loop

Board footer

Powered by FluxBB