Skip to content

Commit

Permalink
[SPEC] Allow nested struct fields in SchemaDatasetFacet
Browse files Browse the repository at this point in the history
Signed-off-by: Martynov Maxim <martinov_m_s_@mail.ru>
  • Loading branch information
dolfinus committed Mar 29, 2024
1 parent 1c60584 commit 064cfb6
Showing 1 changed file with 30 additions and 20 deletions.
50 changes: 30 additions & 20 deletions spec/facets/SchemaDatasetFacet.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,34 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://openlineage.io/spec/facets/1-0-0/SchemaDatasetFacet.json",
"$id": "https://openlineage.io/spec/facets/1-0-1/SchemaDatasetFacet.json",
"$defs": {
"SchemaFieldItem": {
"type": "object",
"properties": {
"name": {
"description": "The name of the field.",
"type": "string",
"example": "column1"
},
"type": {
"description": "The type of the field.",
"type": "string",
"example": "VARCHAR|INT|..."
},
"description": {
"description": "The description of the field.",
"type": "string"
},
"fields": {
"description": "Nested fields (for struct and array).",
"type": "array",
"items": {
"$ref": "#/$defs/SchemaFieldItem"
}
}
},
"required": ["name"]
},
"SchemaDatasetFacet": {
"allOf": [
{
Expand All @@ -11,27 +38,10 @@
"type": "object",
"properties": {
"fields": {
"description": "The fields of the table.",
"description": "The fields of the data source.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "The name of the field.",
"type": "string",
"example": "column1"
},
"type": {
"description": "The type of the field.",
"type": "string",
"example": "VARCHAR|INT|..."
},
"description": {
"description": "The description of the field.",
"type": "string"
}
},
"required": ["name"]
"$ref": "#/$defs/SchemaFieldItem"
}
}
}
Expand Down

0 comments on commit 064cfb6

Please sign in to comment.