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.

XML to MySQL conversion/mapping Options · View
filipe.santana-lopes
Posted: Wednesday, January 15, 2020 11:52:27 AM
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):
image-1.png

that
Posted: Wednesday, January 15, 2020 12:27:42 PM
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
filipe.santana-lopes
Posted: Thursday, January 16, 2020 4:28:53 PM
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):
1-data-strukture.png

K101
Posted: Friday, January 17, 2020 7:38:05 AM
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?
filipe.santana-lopes
Posted: Friday, January 17, 2020 4:55:10 PM
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.
K101
Posted: Monday, January 20, 2020 10:43:30 AM
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.
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.