Azure Data Factory and empty rest api json array

Orlando Fuller 20 Reputation points

I'm using ADF to connect and bring in data from Survey Monkey rest api. I have to modify the json file to remove the first array object because its empty. The Flatten object doesn't know how to handle this empty array. See screen shot below. emptyarrayobject.png

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,711 questions
{count} votes

Accepted answer
  1. AnnuKumari-MSFT 31,561 Reputation points Microsoft Employee

    Hi @Orlando Fuller ,

    Thanks for using Microsoft Q&A platform and thanks for posting your query here.

    As I understand your question, you are trying to flatten the json where the first object is having empty array. I assume that you are trying to use flatten transformation in Mapping dataflow to do this job. Please let me know if that is not the case.

    ADF will always consider the first object of the array as the schema . So, kindly make sure that the while flattening the json , first object is having the schema that you desire to flatten.

    You need to modify the Json and remove the first object having empty array or keep it below after a valid object. Doing so will convert the empty array as NULL.

    User's image

    Hope it helps. Kindly accept the answer if it helped. Thanks

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Orlando Fuller 20 Reputation points

    I am accepting the answer because that's what I've done in the past. I just wanted know if there are others who have the same issue but have a different answer or another work around. I'm currently using VS so I want have to modify the file. Thank You

    0 comments No comments