IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Optimizing datamapping from XSLX to n XML files Options · View
mmt
Posted: Thursday, January 24, 2019 8:44:27 AM
Rank: Newbie

Joined: 5/9/2018
Posts: 4
Dear Forum.

My source file is XLSX with two sheets, called contacts and accounts.
If a contact is related to an account, then a field in the contact sheet is referring to an unique account id in the account sheet.

For generating XML I have a XSD that describes the target component XML elements.
I have then mapped the XLSX fields to the corresponding XML elements.
As the generated file is too big (to be used in a different process), I am splitting up the data into 5 or so XML files.
I do this at the moment by counting to 5000 contacts and then presume creating the next file.

My problem though is that the current Mapforce model transfers all the accounts to all 5 XML files, so each file has 5000 unique contacts, but identical accounts in all XML files.

What I have tried is to use a "Equal" and a "Filter" component.
I use the account id from the source contact account id to "a" in the "Equal" component and the account id from the source account id to "b" in the "Equal" component.
The boolean result is then passed to "Filter" component where it should only return when boolean is true, thus inserting the account id to the respective XML.

When I try to filter the accounts to be excluded in the respective 5 XML's I run into performance issues... it runs too slowly so I know I am doing something wrong.

Could any of you help with an example that shows how I can create n XML files where all the references from the 5000 contacts to accounts only include the exact accounts needed in the file?

Notice!
Bear in mind that the accounts can be referenced to from different contacts so the accounts can be part of one or more of the XML's files, just as long as the contacts in the file are referring to them.

Let me know if I need to add more insights to the problem or details of the model/XSD etc.
THANKS!


<picture XML file split>
<picture of XLSX source: account sheet>
<picture of XLSX source: contact sheet>
<picture of XML target: reference to account id from contact element and id from account element>
<picture of filtering accounts before inserting into XML target>


mmt attached the following image(s):
split into n XML files.png
Account sheet.png
Contact sheet.png
contact account id and account id.png
Filtering accounts to XML.png

Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.