Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…

Topic-icon Question From XML to MultipleCibles

More
06 May 2015 13:46 #1 by TAOUILI
From XML to MultipleCibles was created by TAOUILI
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
Replied by Thomas BLETON on 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
Replied by TAOUILI on 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
Replied by Thomas BLETON on 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.