Rank: Newbie
Joined: 7/30/2018 Posts: 2
|
Hello all,
I am trying to take an XML document and store it in several database tables - basically document ingestion. I am having a bit of a problem, however, as my documents have 2 levels of nesting - the main document has sub-documents, and those sub-documents can in turn have an array of values as one of the fields, essentially another sub-document. When testing the mapping to output to database tables, the main document and the first sub-document all behave correctly, except for the array of values fields. I get warnings on those - "One or several additional values were skipped." I have tried several different methods to get this to work and have not been successful, including variables, filters, and other mappings. The mapping I am trying to work with looks like this (this is simplified to the bare bones of the problem), and references a couple of tables. Any ideas or help would be appreciated! BenRhew attached the following image(s):
|
Rank: Newbie
Joined: 10/28/2002 Posts: 1,283 Location: AT
|
Hi, why this is occuring is best illustrated by example.
In the top example of the mapping below "foo" (which appears once in the source file) is connected to "Rows", meaning that one Row will be generated in the output. The problem is that there are three "barvalue" elements. It is not possible to store all three values in one row so the last "barvalue" i.e. "bar3" will be stored in "Field2".
In the bottom example "barvalue" (which occurs three times in the source) is connected to "Rows"meaning that three Rows will be generated. This will accomodate all three "barvalue" elements and the "foovalue" will be repeated for each row.
island attached the following image(s):
|
Rank: Newbie
Joined: 7/30/2018 Posts: 2
|
Aha, thank you for that! That was the one thing I didn't try - now I can move on with the rest of my mapping.
|