question

DineshKakumanu-1746 avatar image
0 Votes"
DineshKakumanu-1746 asked RohanChawla-3844 commented

How to flatten multiple arrays in an XML document using dataflows?

Hi,

I have multiple complex arrays and nested objects in my XML document but through dataflows I'm not able to flatten all the columns using flatten activity. I tried using multiple flatten activities but it is overwriting the previous mappings.

I have attached a sample XML document and the approach I tried in the attached images. Is there any way to achieve clean flattening of all my columns in the sample file using data factory?

@MartinJaffer-MSFT

112507-sample.xml


112527-image.png

112518-image.png


azure-data-factory
image.png (65.7 KiB)
image.png (70.4 KiB)
sample.xml (1.3 MiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MarkKromer-MSFT avatar image
0 Votes"
MarkKromer-MSFT answered RohanChawla-3844 commented

If you have multiple array types inside of your top-level array that you unroll in Flatten, use the Rule-Based mapping option instead and select "Deep column traversal".

· 9
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Could you please explain me more about this process?

0 Votes 0 ·

I tried doing this but the arrays are not being exploded. Could you please explain me more?

112737-image.png


112893-image.png


0 Votes 0 ·
image.png (53.7 KiB)
image.png (59.9 KiB)

Deep traversal will apply to your structures, but the arrays will still need to be unrolled.

0 Votes 0 ·
Show more comments