4

enter image description here

I am trying to output my data after transformations in mapping dataflow to a json file. But the records ends up as separate set of json objects and not joined by commas enclosed in array as shown below:

file contents: {k1:v1,k2:v2} {k1:v3,k2:v4}

enter image description here

Expected: [{k1:v1,k2:v2}, {k1:v3,k2:v4}]

enter image description here

This is causing a problem while reading as it is not a valid json. The same problem can be fixed in copy activity as there is a setting to output as array of objects and not set of objects.

Can anyone help pls..

1 Answer 1

1

Not sure if you are still stuck into this, i will answer it anyway.

You can use the Azure Data Factory Data Flow Flatten mapping, unroll by and unroll root. more information found in the following link:

https://learn.microsoft.com/en-us/azure/data-factory/data-flow-flatten

Sign up to request clarification or add additional context in comments.

2 Comments

Seems like Flatten formatter works only within a row, not across the row.
How would this help? This seems to flatten objects into a less ideal JSON structure - when in fact the aim was to create an array of objects? Maybe I'm missing something.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.