Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Due to some maintenance operations, stambia.org will be switched to read-only mode during the 13th November. It will be possible to read and download, but impossible to post on the forums or create new accounts. For any question please contact the support team.

Topic-icon Question From XML to MultipleCibles

More
06 May 2015 13:46 #1 by TAOUILI
TAOUILI created the topic: From XML to MultipleCibles
Hi,

I have a xml file as data source, I want integrate it in a multiple tables linked together with foreignkey (serial primary key ine the table prncipal "postres"),

What can I mapp in the foreign .

Thanks in advance.
More
06 May 2015 17:59 #2 by Thomas BLETON
Thomas BLETON replied the topic: From XML to MultipleCibles
Hi.
How is the primary key determined ? Is it taken from the source ? Or is it auto-increment / a sequence ?
What is the target database technology ?

In the latter case, maybe you can stage your XML data, load your main table, and then load the child tables with a join between the stage and the main table.
This is an interesting case. Let us know what you find out or if you need more help :)
More
06 May 2015 18:37 #3 by TAOUILI
TAOUILI replied the topic: From XML to MultipleCibles
Hi again,

My primary key is auto-increment (serial) in Postresql.
As you see at the attached file, I tried to joind the tables (just for try) but it doesn't work.
I f you can explain more your idea ou you have an other efficient one.

Thanks
Attachments:
More
07 May 2015 12:33 #4 by Thomas BLETON
Thomas BLETON replied the topic: From XML to MultipleCibles
OK, thanks for the details.
You really need to create a Stage. To create a Stage, drag and drop a database Schema on the mapping, and drop the XML elements on it.
Then, you wil be able to create Join between the Stage and the Main table.

So, your mapping will have :
- the XML as a source
- the Main table as a target (the serial field will be set by the rdbms)
- a Stage which contains XML data for the child tables and a functional key that will match records in the main table
- a Join between the Stage and the Main table, on the functional key (not the serial)
- map the data from the Stage to the child tables

I'm going to prepare an article on this case to illustrate.