How to parse JSON using "$ref" in Azure Data Factory
Leandro
1
Reputation point
Hi, I am using Azure Data Factory to get JSON data from a REST API, flatten it in a Data Flow and finally store it in our data lake.
Our API is using System.Text.Json with ReferenceHandler set to Preserve. This results in a Json like that:
{
"$id": "1",
"Name": "Tyler Stein",
"Manager": null,
"DirectReports": {
"$id": "2",
"$values": [
{
"$id": "3",
"Name": "Adrian King",
"Manager": {
"$ref": "1"
},
"DirectReports": null
}
]
}
}
Unfortunately, when looking at the column projection in Azure Data Flow the "$ref" is listed as separate column instead of replacing it with the object it is referring to.
How can I make sure that the JSON is deserialized correctly before I continue with flattening activities etc.?
Sign in to answer