XML Auto Loader rescuedDataColumn Doesn't Rescue Array Fields

peter_ticker
New Contributor III

Hiya! I'm interested whether anyone has a solution to the following problem. If you load XML using Auto Loader or otherwise and set the schema to be such that a single value is assumed for a given xpath but the actual XML contains multiple values (i.e. should be an array) then the additional values aren't rescued so become irrecoverably dropped.

Example XML data: <Message><Attribute>1</Attribute><Attribute>2</Attribute></Message>

rowTag: Message
Schema applied: Attribute INTEGER (actual schema should be Attribute ARRAY<INTEGER>)
Result: Table containing one column Attribute with 2 as the value and the rescuedDataColumn is empty.
 
In the above example the value 1 in the additional Attribute tag is dropped and cannot be recovered because it doesn't land in the rescuedDataColumn. I need a way to ensure this data is not dropped because we cannot know whether any given tag in the XML being read has one node corresponding to it or is actually an array.