Medium severitydata flow
Power BI Refresh Error:
DF-JSON-WrongDocumentForm
What does this error mean?
ADF Mapping Data Flows expect JSON source files to match one of three document forms: single document, array of documents, or newline-delimited JSON (NDJSON/JSON Lines).
Common causes
- 1The 'Document form' setting in the JSON dataset is set to 'Single document' but the file contains a JSON array
- 2The file uses newline-delimited JSON (one JSON object per line) but the dataset is configured as 'Single document' or 'Array of documents'
- 3The file has a multi-root structure (multiple top-level objects not wrapped in an array) which no standard document form supports
- 4The JSON file was recently restructured by the upstream system and the dataset document form was not updated to match
How to fix it
- 1In ADF Studio, open the JSON dataset and click 'Connection' > check the 'Document form' dropdown.
- 2Open a sample in a text editor: starts with '[' → 'Array of documents'; each line is a JSON object → 'Set of objects' (NDJSON); one JSON object → 'Single document'.
- 3Update the 'Document form' setting to match the actual file structure and click OK.
- 4Enable debug mode and run a data preview on the source transformation to confirm the schema is parsed correctly.
- 5If the upstream system produces inconsistent document forms, add a preprocessing step to normalize the format before the data flow reads it.
Frequently asked questions
Official documentation: https://learn.microsoft.com/en-us/azure/data-factory/data-flow-troubleshoot-guide