ADF Copy Activity only returns one row when ADP Workers JSON file contains root array + “workers” wrapper
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.