An Azure service for ingesting, preparing, and transforming data at scale.
ADF mapping data flows did not change behavior specifically in “Feb Week 2” in the documentation, but the described symptom (JSON array suddenly not parsing and returning null) matches known JSON/CSV and JSON parsing issues and configuration pitfalls.
Based on the JSON sample:
[{"abc":"def", "xyz":["bcd", "ahdjwhg"],"uvw":["abc, def"]}]
there are two likely causes and corresponding fixes:
- Wrong JSON document form / parsing settings
If the JSON source or Parse transformation is misconfigured, ADF can fail schema inference and return nulls.
Relevant error pattern in ADF:
- Error code
DF-JSON-WrongDocumentFormorDF-Executor-SystemInvalidJsonwith message about malformed records or unsupported encoding/multiline.
Recommended checks:
- In the JSON source of the data flow, open JSON settings and try different Document form values:
- Single document
- Document per line
- Array of documents The documentation explicitly states that most parsing errors are caused by a wrong Document form selection.
- If the JSON is produced by a Copy activity, verify:
- Encoding (UTF-8/16/32 with BOM) vs. data flow JSON source settings.
- Whether Single document is enabled when the file actually contains an array or multiple documents.
- Use Data preview and Inspect in the data flow to confirm the inferred schema and that the array fields (
xyz,uvw) are recognized as arrays. - JSON embedded in CSV / CDM or misread as multiple columns
If the JSON array is stored as a string inside a CSV or CDM column, commas inside the JSON can cause the value to be split into multiple columns, which then breaks parsing and yields null.
Known behavior:
- When a JSON array or object is stored in a CSV column, commas inside the JSON are treated as column separators unless the value is properly quoted.
- In CDM/CSV scenarios, ADF may infer one JSON attribute as multiple columns instead of a single JSON string column.
Recommendation in this case:
- Ensure the JSON column is:
- Double-quoted as a single CSV field.
- Inner quotes escaped with a backslash (
\). This ensures the entire JSON array is read as one string column.
- After the JSON is correctly ingested as a single string column, use a Parse transformation to convert it into a complex type (array/struct/map). The Parse transformation documentation recommends:
- Use Detect type in the expression builder to infer the output schema from the JSON string.
- Then use a Derived Column transformation to access nested elements.
- Special characters and attribute extraction issues
If parsing complex types and extracting attributes (for example, using @model or keys with dashes), ADF can fail and return null. The documentation suggests:
- For attributes like
@model, convert the complex type to string, remove@withreplace, then parse again. - For JSON keys with
-, use bracket notation and a variable:var bestScore = data["best-score"]; { bestScore : { "section 1": 1234 } }
- Snowflake / VARIANT scenarios (if sink is Snowflake)
If the JSON is being written to Snowflake VARIANT columns and suddenly fails:
- Snowflake VARIANT columns only accept struct/map/array types from data flows, not raw strings.
- Use a Parse transformation before the Snowflake sink to convert the JSON string into array/struct/map.
Summary of actions to fix null parsing:
- Verify JSON Document form in the JSON source and adjust (Single document / Document per line / Array of documents).
- If JSON is inside CSV/CDM:
- Ensure the JSON value is fully double-quoted and inner quotes escaped.
- Reimport or re-read the file so the JSON is a single string column.
- Use Parse transformation with Detect type to convert the JSON string into arrays/structs, then access elements via Derived Column.
- For special keys (
@,-), apply the documented workarounds (string replace, bracket notation).
References: