Does Azure Data Factory Support JSON Schema $ref for Data Flow

Shannon Buckley 20 Reputation points
2023-09-27T19:19:41.85+00:00

I am working in Azure Data Factory (ADF) to create a data flow that uses a JSON file as the source. My JSON file is too large for ADF to automatically generate the schema and so I am choosing the option to import the schema from a local file.

In my local file, I use a "definitions" subsection and the $ref keyword to reference subschemas within the file. A trivial example of this structure can be seen below.

"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
	"car": {
          "type": "array",
          "items": {
             "$ref": "#/definitions/carpart"
	  	  },
	},
},
"definitions": {
		  "carpart": {
  			 "name": "string",
			 "color": "string",
			 "weight": "int"
		  }
}


However, when I load this schema into ADF, the "$ref" is not interpreted as a reference is instead ignored and my "car" array is shown as "type": "undefined:, as seen below:

User's image

Is there a way to use references, such as "$ref": "#/definitions/carpart" when defining a schema for a JSON source in a dataflow?

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

Accepted answer
  1. ShaikMaheer-MSFT 38,546 Reputation points Microsoft Employee Moderator
    2023-10-03T06:22:46.6033333+00:00

    Hi Shannon Buckley,

    Thank you for posting query in Microsoft Q&A Platform.

    Referencing schema as defined in the question into dataset schema is not possible at this moment. Kindly consider including schema their itself, instead of reference.

    Please note, its good feedback to consider. I would encourage you to submit feedback for same using below link. Internal team will closely monitor feedback and consider for future implementations. Thank you.

    https://feedback.azure.com/d365community/forum/1219ec2d-6c26-ec11-b6e6-000d3a4f032c

    Hope this helps. Please let me know if any further queries.


    Please consider hitting Accept Answer button. Accepted answers help community as well. Thank you.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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