Hi @arkiboys ,
Thanks for posting query in Microsoft Q&A Platform.
As I understand ask here you are trying to flatten a key which some times has array and some times not. Please correct me if I am wrong.
Flatten transformation to work the key or column should be in array format only. So we should make sure that column should always contains array value.
We can consider either of below to over come this.
- Check the source system if that can produce json data in proper format.
- Manually edit json source file.
- Use Azure Functions or custom code logic to modify json file and then process in data flow.
Kindly check below option as well if that works.
- Modifying json data in data flows itself and then load that data in to some txt file initially.
- Then using copy activity take that text file as source and load it as json file(in this step use binary format for source and sink).
- And then see if you can pull that json and use flatten transformation.
Hope this helps. Please let us know how it goes. Thank you.