ADF Copy Activity only returns one row when ADP Workers JSON file contains root array + “workers” wrapper

Tom Morris 0 Reputation points
2025-12-13T00:01:06.2+00:00

I am integrating ADP Workers API data using Azure Data Factory (ADF). The Workers payload sometimes arrives in this structure:

	[

	  {

		"workers": [

		  { "associateOID": "...", "workerID": {...}, "person": {...}, ... },

		  { "associateOID": "...", ... }

		]

	  },

	  {

		"workers": [

		  { "associateOID": "...", ... }

		]

	  }

	]

So:

The root of the file is an array.

Each element contains a workers array with one or more real Worker objects.

In ADF I want one row per worker, not one row per wrapper.

I attempted multiple Collection Reference values in the Copy activity Mapping tab:

$[0].workers

$[*].workers

$.workers

No matter what I try, ADF only produces one row per wrapper object, and the RawJson column still contains:

	{"workers":[{...}]}

If so:

What Collection Reference did you use?

Did this require a special JSON dataset config?

Did you have to preprocess the JSON (e.g., un-nest the wrapper) before ADF could flatten it?

Any guidance or examples appreciated.

Our current workaround is to land the wrapper JSON as-is, then use SQL OPENJSON(... '$.workers') to normalize into one row per worker before running warehouse loaders. I’m mostly asking if there’s a cleaner way to get ADF Copy to flatten both the root array and the workers array in one step.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
0 comments No comments
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.