Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
Add nested fields to SchemaDatasetFacet example (#335)
Browse files Browse the repository at this point in the history
Signed-off-by: Мартынов Максим Сергеевич <[email protected]>
  • Loading branch information
dolfinus authored Jun 27, 2024
1 parent f34733b commit 536b2ec
Showing 1 changed file with 72 additions and 2 deletions.
74 changes: 72 additions & 2 deletions docs/spec/facets/dataset-facets/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ sidebar_position: 6
The schema dataset facet contains the schema of a particular dataset.
Besides a name, it provides an optional type and description of each field.

Nested fields are supported as well.


Example:

Expand All @@ -17,7 +19,7 @@ Example:
"facets": {
"schema": {
"_producer": "https://some.producer.com/version/1.0",
"_schemaURL": "https://openlineage.io/spec/facets/1-0-0/SchemaDatasetFacet.json",
"_schemaURL": "https://openlineage.io/spec/facets/1-1-1/SchemaDatasetFacet.json",
"fields": [
{
"name": "id",
Expand All @@ -33,6 +35,74 @@ Example:
"name": "is_active",
"type": "boolean",
"description": "Has customer completed activation process"
},
{
"name": "phones",
"type": "array",
"description": "List of phone numbers",
"fields": [
{
"name": "_element",
"type": "string",
"description": "Phone number"
}
]
},
{
"name": "address",
"type": "struct",
"description": "Customer address",
"fields": [
{
"name": "type",
"type": "string",
"description": "Address type, g.e. home, work, etc."
},
{
"name": "country",
"type": "string",
"description": "Country name"
},
{
"name": "zip",
"type": "string",
"description": "Zip code"
},
{
"name": "state",
"type": "string",
"description": "State name"
},
{
"name": "street",
"type": "string",
"description": "Street name"
}
]
},
{
"name": "custom_properties",
"type": "map",
"fields": [
{
"name": "key",
"type": "string"
},
{
"name": "value",
"type": "union",
"fields": [
{
"name": "_0",
"type": "string"
},
{
"name": "_1",
"type": "int64"
}
]
}
]
}
]
}
Expand All @@ -42,4 +112,4 @@ Example:
}
```

The facet specification can be found [here](https://openlineage.io/spec/facets/1-0-0/SchemaDatasetFacet.json).
The facet specification can be found [here](https://openlineage.io/spec/facets/1-1-1/SchemaDatasetFacet.json).

0 comments on commit 536b2ec

Please sign in to comment.