Combine XML Export for Data Import

Shawn Dowler
Tera Guru

I know this is possible, but I can't figure out how to make it work. What tags can I manipulate to combine multiple XML exports so I only have to import one file. For example, if create a role and a group, then assign the role to the group, then assign users to the group and the group members automatically get the role because of business rules, then I have to export records from 5 different tables. I would like to merge those 5 files so I can just import one file into the sub prod instances.

1 ACCEPTED SOLUTION

Shawn Dowler
Tera Guru

Okay, so I discovered that this appears to work, but I'm not sure if it's a good practice or not: If you leave the header and the unload open and close tags in place from one file, then copy everything between the unload tags in each of the other files and paste them into the first file right under the opening unload tag, then save it as a new file, when you import it worked for me. Is this the way I should do it going forward?



I can also use this for my test environment to create my test users and give them the right roles and put them in the right groups for testing purposes. I should be able to add this to post clone scripts sometime to really make it all automated.



I welcome additional feedback or ideas.


View solution in original post

3 REPLIES 3

Shawn Dowler
Tera Guru

Okay, so I discovered that this appears to work, but I'm not sure if it's a good practice or not: If you leave the header and the unload open and close tags in place from one file, then copy everything between the unload tags in each of the other files and paste them into the first file right under the opening unload tag, then save it as a new file, when you import it worked for me. Is this the way I should do it going forward?



I can also use this for my test environment to create my test users and give them the right roles and put them in the right groups for testing purposes. I should be able to add this to post clone scripts sometime to really make it all automated.



I welcome additional feedback or ideas.


Thanks for this, Shawn.   The system wouldn't accept my file when I just commented out the excess <xml> header and <unload> tags using <!-- and -->, akin to //.   I physically had to delete these extra lines, approaching it like you did.   Thanks!


Santi Cots
Tera Contributor

Hi Shawn,

It works to me too. I was doing it using a text editor but, at the end, I decided to create a simple script that does the merge for me.

Santi