Rank: Newbie
Joined: 1/15/2020 Posts: 5 Location: Köln
|
Hello,
I am stuck, several items are skipped, here is just an example of a little part of it: One or several additional values were skipped. The value "ZLH08113E" was mapped. First skipped value(s): "W01002G12", "W01002S12", "SEAF00213", "SEKF00113", "BME002G13104", "BME002S13501".
From what I can see, I need to create a loop, since Map Force will only generate an SQL insert for the very first result. However, I found no such function in the library nor in the documentation. A loop is mentioned in the manual, but it's unclear to me how to implement it for my XML data set.
filipe.santana-lopes attached the following image(s):
|
Rank: Advanced Member
Joined: 6/16/2006 Posts: 486 Location: AT
|
You need to create the correct parent connection(s), or use string-join to concatenate all values. Unfortunately the right side of your screenshot is missing so I can't give you any more specific advice.
Read this for details how to solve your problem: https://www.altova.com/manual/Mapforce/mapforceenterprise/mffmapping_strategies.html
|
Rank: Newbie
Joined: 1/15/2020 Posts: 5 Location: Köln
|
Hey,
Thanks for your answer.
For now we just receive the first part which you can see in the code, but we should be able to see 91 SQL Inserts.
Code:INSERT INTO `xxx_test_2020_01_13` (`nr`, `preis`, `modell`, `produktkategorie`, `name`, `type`, `ausfuehrung1`, `ausfuehrung3_c`, `ausfuehrung3`, `beschreibung1`, `warengruppe`) VALUES ('HLL013033', 1115, 'Solitaire 6045', 'Schränke', 'Hochschrank', 'HLL013033', '1', 'Bitte Türanschlag links (L),', '1', 'Hochschrank<br>2 Drehtüren<br>1 Auszug<br>3 Glaseinlegeböden', 24)
INSERT INTO `xxx_test_2020_01_13` (`nr`, `preis`, `modell`, `produktkategorie`, `name`, `type`, `ausfuehrung1`, `ausfuehrung3_c`, `ausfuehrung3`, `beschreibung1`, `warengruppe`) VALUES ('HLL013033', 1320, 'Solitaire 6045', 'Schränke', 'Hochschrank', 'HLL013033', '2', 'Bitte Türanschlag links (L),', '1', 'Hochschrank<br>2 Drehtüren<br>1 Auszug<br>3 Glaseinlegeböden', 24) -- this line is added by me ....
here are also 2 screenshots, of the data structure and the connections between XML and the database.
Thanks in advance for your help! filipe.santana-lopes attached the following image(s):
|
Rank: Advanced Member
Joined: 2/27/2009 Posts: 558
|
Based on those screenshots MapForce is doing exactly what you've asked it to do which is insert one row based on the SERIE element with SERIE_NO=2.
You write that you want 91 inserts. Which XML element in your input file occurs 91 times?
|
Rank: Newbie
Joined: 1/15/2020 Posts: 5 Location: Köln
|
Hello K101,
Yes, here is the count of which exist inside of the serie_no "2":
SERIE_NO; PRODUCT_GROUPS; TYPE_NO; PRICE 1; 4; 50; 91
Right now it just gives me the first row of that Serie_no.
But I need everything that belongs to that Serie_no, so in total I need to have 91 INSERTs as SQL Code.
Thanks in advance.
|
Rank: Advanced Member
Joined: 2/27/2009 Posts: 558
|
I rather suspect it's the ITEM element which occurs 91 times within your SERIE. So, you most likely need to connect ITEM to your database "pol" (or "pel"? It's a little hard to read) root element. You can still filter that based on SERIE_NO=2.
If you still need more help beyond that, you should probably either attach your files here, or send them to Altova Support in case they're not appropriate for public disclosure.
|