tengqm commented on code in PR #6946:
URL: https://github.com/apache/gravitino/pull/6946#discussion_r2046345094
##########
docs/lineage/gravitino-server-lineage.md:
##########
@@ -0,0 +1,56 @@
+---
+title: "Gravitino server Lineage support"
+slug: /lineage/gravitino-server-lineage
+keyword: Gravitino OpenLineage
+license: "This software is licensed under the Apache License version 2."
+---
+
+## Overview
+
+Gravitino server provides a pluginable lineage framework to receive, process,
and sink OpenLineage events. By leveraging this, you could do custom process
for the lineage event and sink to your dedicated systems.
+
+## Lineage Configuration
+
+| Configuration item | Description
| Default value | Required |
Since Version |
+|-----------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|----------|---------------|
+| `gravitino.lineage.source` | The name of lineage event
source. The default `http` event source will .
| http | No
| 0.9.0 |
+| `gravitino.lineage.${sourceName}.sourceClass` | The name of the lineage
source class which should implement
`org.apache.gravitino.lineage.source.LineageSource` interface.
| (none)
| No | 0.9.0 |
+| `gravitino.lineage.processorClass` | The name of the lineage
processor class which should implement
`org.apache.gravitino.lineage.processor.LineageProcessor` interface. The
default noop processor will do nothing about the run event. |
`org.apache.gravitino.lineage.processor.NoopProcessor` | No | 0.9.0
|
+| `gravitino.lineage.sinks` | The name of lineage event
sinks.
| log | No
| 0.9.0 |
+| `gravitino.lineage.${sinkName}.sinkClass` | The name of the lineage sink
class which should implement `org.apache.gravitino.lineage.sink.LineageSink`
interface.
| (none) | No
| 0.9.0 |
+| `gravitino.lineage.queueCapacity` | The total capacity of
lineage event queues. If there are multi lineage sinks, the sinks will use an
isolated event queue with the capacity of `gravitino.lineage.queueCapacity` div
the num of sinks. | 10000 | No
| 0.9.0 |
+
+## Lineage http source
+
+Http source provides an endpoint which follows [OpenLineage API
spec](https://openlineage.io/apidocs/openapi/) to receive OpenLineage run
event. The following use example:
+
+```shell
+curl -X POST http://localhost:8090/api/lineage \
+ -i -H 'Content-Type: application/json' \
+ -d '{
+ "eventType": "START",
+ "eventTime": "2023-10-28T19:52:00.001+10:00",
+ "run": {
+ "runId": "0176a8c2-fe01-7439-87e6-56a1a1b4029f"
+ },
+ "job": {
+ "namespace": "gravitino-namespace",
+ "name": "gravitino-job1"
+ },
+ "inputs": [{
+ "namespace": "gravitino-namespace",
+ "name": "gravitino-table-identifier"
+ }],
+ "producer":
"https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client",
+ "schemaURL":
"https://openlineage.io/spec/1-0-5/OpenLineage.json#/definitions/RunEvent"
+ }'
Review Comment:
To make the command work, better revise it to:
```suggestion
cat <<EOF >source.json
{
"eventType": "START",
"eventTime": "2023-10-28T19:52:00.001+10:00",
"run": {
"runId": "0176a8c2-fe01-7439-87e6-56a1a1b4029f"
},
"job": {
"namespace": "gravitino-namespace",
"name": "gravitino-job1"
},
"inputs": [{
"namespace": "gravitino-namespace",
"name": "gravitino-table-identifier"
}],
"producer":
"https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client",
"schemaURL":
"https://openlineage.io/spec/1-0-5/OpenLineage.json#/definitions/RunEvent"
}
EOF
curl -X POST \
-i -H 'Content-Type: application/json' \
-d '@source.json' \
http://localhost:8090/api/lineage
```
##########
docs/lineage/gravitino-server-lineage.md:
##########
@@ -0,0 +1,56 @@
+---
+title: "Gravitino server Lineage support"
+slug: /lineage/gravitino-server-lineage
+keyword: Gravitino OpenLineage
+license: "This software is licensed under the Apache License version 2."
+---
+
+## Overview
+
+Gravitino server provides a pluginable lineage framework to receive, process,
and sink OpenLineage events. By leveraging this, you could do custom process
for the lineage event and sink to your dedicated systems.
+
+## Lineage Configuration
+
+| Configuration item | Description
| Default value | Required |
Since Version |
+|-----------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|----------|---------------|
+| `gravitino.lineage.source` | The name of lineage event
source. The default `http` event source will .
| http | No
| 0.9.0 |
+| `gravitino.lineage.${sourceName}.sourceClass` | The name of the lineage
source class which should implement
`org.apache.gravitino.lineage.source.LineageSource` interface.
| (none)
| No | 0.9.0 |
+| `gravitino.lineage.processorClass` | The name of the lineage
processor class which should implement
`org.apache.gravitino.lineage.processor.LineageProcessor` interface. The
default noop processor will do nothing about the run event. |
`org.apache.gravitino.lineage.processor.NoopProcessor` | No | 0.9.0
|
+| `gravitino.lineage.sinks` | The name of lineage event
sinks.
| log | No
| 0.9.0 |
Review Comment:
Is the value a plural? say, comma-separated strings?
##########
docs/lineage/gravitino-server-lineage.md:
##########
@@ -0,0 +1,56 @@
+---
+title: "Gravitino server Lineage support"
+slug: /lineage/gravitino-server-lineage
+keyword: Gravitino OpenLineage
+license: "This software is licensed under the Apache License version 2."
+---
+
+## Overview
+
+Gravitino server provides a pluginable lineage framework to receive, process,
and sink OpenLineage events. By leveraging this, you could do custom process
for the lineage event and sink to your dedicated systems.
+
+## Lineage Configuration
+
+| Configuration item | Description
| Default value | Required |
Since Version |
+|-----------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|----------|---------------|
+| `gravitino.lineage.source` | The name of lineage event
source. The default `http` event source will .
| http | No
| 0.9.0 |
Review Comment:
`http` cannot be a source, it can be a type of source.
"The default `http` event source will ." <-- incomplete sentence.
##########
docs/open-api/lineage.yaml:
##########
@@ -0,0 +1,281 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+---
+
+openapi: 3.0.2
+info:
+ title: OpenLineage
+ version: 2-0-2
+ description: OpenLineage is an open source **lineage and metadata collection
API** for the data ecosystem.
+ license:
+ name: Apache 2.0
+ url: http://www.apache.org/licenses/LICENSE-2.0.html
+paths:
+ /api/lineage:
+ post:
+ summary: Send an event related to the state of a run
+ description: Updates a run state for a job.
+ operationId: postRunEvent
+ tags:
+ - OpenLineage
+ requestBody:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/RunEvent'
+ - $ref: '#/components/schemas/DatasetEvent'
+ - $ref: '#/components/schemas/JobEvent'
+ responses:
+ 200:
+ description: OK
+components:
+ schemas:
+ BaseEvent:
+ type: object
+ properties:
+ eventTime:
+ description: the time the event occurred at
+ type: string
+ format: date-time
+ producer:
+ description: URI identifying the producer of this metadata. For
example this could be a git url with a given tag or sha
+ type: string
+ format: uri
+ example:
https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client
+ schemaURL:
+ description: The JSON Pointer (https://tools.ietf.org/html/rfc6901)
URL to the corresponding version of the schema definition for this RunEvent
+ type: string
+ format: uri
+ example: https://openlineage.io/spec/0-0-1/OpenLineage.json
+ required:
+ - eventTime
+ - producer
+ - schemaURL
+ BaseFacet:
+ description: all fields of the base facet are prefixed with _ to avoid
name conflicts in facets
+ type: object
+ properties:
+ _producer:
+ description: URI identifying the producer of this metadata. For
example this could be a git url with a given tag or sha
+ type: string
+ format: uri
+ example:
https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client
+ _schemaURL:
+ description: The JSON Pointer (https://tools.ietf.org/html/rfc6901)
URL to the corresponding version of the schema definition for this facet
+ type: string
+ format: uri
+ example:
https://openlineage.io/spec/1-0-2/OpenLineage.json#/$defs/BaseFacet
+ additionalProperties: true
+ required:
+ - _producer
+ - _schemaURL
+ RunFacet:
+ description: A Run Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ Run:
+ type: object
+ properties:
+ runId:
+ description: The globally unique ID of the run associated with the
job.
+ type: string
+ format: uuid
+ facets:
+ description: The run facets.
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/RunFacet'
+ required:
+ - runId
+ JobFacet:
+ description: A Job Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ - type: object
+ properties:
+ _deleted:
+ description: set to true to delete a facet
+ type: boolean
+ Job:
+ type: object
+ properties:
+ namespace:
+ description: The namespace containing that job
+ type: string
+ example: my-scheduler-namespace
+ name:
+ description: The unique name for that job within that namespace
+ type: string
+ example: myjob.mytask
+ facets:
+ description: The job facets.
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/JobFacet'
+ required:
+ - namespace
+ - name
+ DatasetFacet:
+ description: A Dataset Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ - type: object
+ properties:
+ _deleted:
+ description: set to true to delete a facet
+ type: boolean
+ Dataset:
+ type: object
+ properties:
+ namespace:
+ description: The namespace containing that dataset
+ type: string
+ example: my-datasource-namespace
+ name:
+ description: The unique name for that dataset within that namespace
+ type: string
+ example: instance.schema.table
+ facets:
+ description: The facets for this dataset
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/DatasetFacet'
+ required:
+ - namespace
+ - name
+ InputDatasetFacet:
+ description: An Input Dataset Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ InputDataset:
+ description: An input dataset
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/Dataset'
+ - type: object
+ properties:
+ inputFacets:
+ description: The input facets for this dataset.
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/InputDatasetFacet'
+ OutputDatasetFacet:
Review Comment:
The difference between "Input..." and "Output..." is about the usage of a
type.
These two types are actually identical.
I don't see a reason to have duplicated types in the API for this purpose.
##########
docs/lineage/gravitino-spark-lineage.md:
##########
@@ -0,0 +1,79 @@
+---
+title: "Gravitino Spark Lineage support"
+slug: /lineage/gravitino-spark-lineage
+keyword: Gravitino Spark OpenLineage
+license: "This software is licensed under the Apache License version 2."
+---
+
+## Overview
+
+By leveraging OpenLineage Spark plugin, Gravitino provides a separate Spark
plugin to extract data lineage and transform the dataset identifier to
Gravitino identifier.
+
+## Capabilities
+
+- Supports column lineage.
+- Supports lineage across different catalogs like like fileset, Iceberg, Hudi,
Paimon, Hive, Model, etc.
+- Supports extract Gravitino dataset from GVFS.
+- Supports Gravitino spark connector and non Gravitino Spark connector.
+
+## Gravitino dataset
+
+The Gravitino OpenLineage Spark plugin transforms the Gravitino metalake name
into the dataset namespace. The dataset name varies by dataset type when
generating lineage information.
+
+If you are using to access the table managed by Gravitino, the dataset name is
as follows:
+When using the [Gravitino Spark
connector](/spark-connector/spark-connector.md) to access tables managed by
Gravitino, the dataset name follows this format:
+
+
+| Dataset Type | Dataset name | Example
| Since Version |
+|-----------------|------------------------------------------------|----------------------------|---------------|
+| Hive catalog | `$GravitinoCatalogName.$schemaName.$tableName` |
`hive_catalog.db.student` | 0.9.0 |
+| Iceberg catalog | `$GravitinoCatalogName.$schemaName.$tableName` |
`iceberg_catalog.db.score` | 0.9.0 |
+| Paimon catalog | `$GravitinoCatalogName.$schemaName.$tableName` |
`paimon_catalog.db.detail` | 0.9.0 |
+| JDBC catalog | `$GravitinoCatalogName.$schemaName.$tableName` |
`jdbc_catalog.db.score` | 0.9.0 |
+
+For datasets not managed by Gravitino, the dataset name is as follows:
+
+| Dataset Type | Dataset name | Example
| Since Version |
+|--------------|------------------------------------|----------------------------|---------------|
+| Hive | `spark_catalog.$dbName.$tableName` | `spark_catalog.db.table`
| 0.9.0 |
+| Iceberg | `$catalogName.$dbName.$tableName` |
`iceberg_catalog.db.table` | 0.9.0 |
+| JDBC v2 | `$catalogName.$dbName.$tableName` | `jdbc_catalog.db.table`
| 0.9.0 |
+| JDBC v1 | `spark_catalog.$dbName.$tableName` | `spark_catalog.db.table`
| 0.9.0 |
+
+When accessing datasets by location (e.g., `SELECT * FROM
parquet.$dataset_path`), the name is derived from the physical path:
+
+| Location Type | Dataset name | Example
| Since Version |
+|----------------|--------------------------------------------------|---------------------------------------|---------------|
+| GVFS location | `$GravitinoCatalogName.$schemaName.$filesetName` |
`fileset_catalog.schema.fileset_a` | 0.9.0 |
+| Other location | location path |
`hdfs://127.0.0.1:9000/tmp/a/student` | 0.9.0 |
+
+For fileset dataset, the plugin add location facets which contains the
location path.
+
+## How to use
+
+1. Download Gravitino OpenLineage plugin jar and place it to the classpath of
Spark.
+2. Add configuration to the Spark to enable lineage collect.
+
+Configuration example For Spark shell:
+
+```shell
+./bin/spark-sql -v \
+--jars
/$path/openlineage-spark_2.12-$version.jar,/$path/gravitino-spark-connector-runtime-3.5_2.12-$version.jar
\
+--conf
spark.plugins="org.apache.gravitino.spark.connector.plugin.GravitinoSparkPlugin"
\
+--conf spark.sql.gravitino.uri=http://localhost:8090 \
+--conf spark.sql.gravitino.metalake=$metalakeName \
+--conf
spark.extraListeners=io.openlineage.spark.agent.OpenLineageSparkListener \
+--conf spark.openlineage.transport.type=http \
+--conf spark.openlineage.transport.url=http://localhost:8090 \
+--conf spark.openlineage.transport.endpoint=/api/lineage \
+--conf spark.openlineage.namespace=$metalakeName \
+--conf spark.openlineage.appName=$appName \
+--conf spark.openlineage.columnLineage.datasetLineageEnabled=true
+```
+
+Please refer to [OpenLineage Spark
guides](https://openlineage.io/docs/guides/spark/) and [Gravitino Spark
connector](/spark-connector/spark-connector.md) for more details. Additionally,
Gravitino provides following configurations for lineage.
+
+| Configuration item | Description
| Default value |
Required | Since Version |
Review Comment:
Please consider using a HTML table for wide tables like this.
##########
docs/open-api/lineage.yaml:
##########
@@ -0,0 +1,281 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+---
+
+openapi: 3.0.2
+info:
+ title: OpenLineage
+ version: 2-0-2
+ description: OpenLineage is an open source **lineage and metadata collection
API** for the data ecosystem.
+ license:
+ name: Apache 2.0
+ url: http://www.apache.org/licenses/LICENSE-2.0.html
+paths:
+ /api/lineage:
+ post:
+ summary: Send an event related to the state of a run
+ description: Updates a run state for a job.
+ operationId: postRunEvent
+ tags:
+ - OpenLineage
+ requestBody:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/RunEvent'
+ - $ref: '#/components/schemas/DatasetEvent'
+ - $ref: '#/components/schemas/JobEvent'
+ responses:
+ 200:
+ description: OK
+components:
+ schemas:
+ BaseEvent:
+ type: object
+ properties:
+ eventTime:
+ description: the time the event occurred at
+ type: string
+ format: date-time
+ producer:
+ description: URI identifying the producer of this metadata. For
example this could be a git url with a given tag or sha
+ type: string
+ format: uri
+ example:
https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client
+ schemaURL:
+ description: The JSON Pointer (https://tools.ietf.org/html/rfc6901)
URL to the corresponding version of the schema definition for this RunEvent
+ type: string
+ format: uri
+ example: https://openlineage.io/spec/0-0-1/OpenLineage.json
+ required:
+ - eventTime
+ - producer
+ - schemaURL
+ BaseFacet:
+ description: all fields of the base facet are prefixed with _ to avoid
name conflicts in facets
+ type: object
+ properties:
+ _producer:
+ description: URI identifying the producer of this metadata. For
example this could be a git url with a given tag or sha
+ type: string
+ format: uri
+ example:
https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client
+ _schemaURL:
+ description: The JSON Pointer (https://tools.ietf.org/html/rfc6901)
URL to the corresponding version of the schema definition for this facet
+ type: string
+ format: uri
+ example:
https://openlineage.io/spec/1-0-2/OpenLineage.json#/$defs/BaseFacet
+ additionalProperties: true
+ required:
+ - _producer
+ - _schemaURL
+ RunFacet:
+ description: A Run Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ Run:
+ type: object
+ properties:
+ runId:
+ description: The globally unique ID of the run associated with the
job.
+ type: string
+ format: uuid
+ facets:
+ description: The run facets.
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/RunFacet'
+ required:
+ - runId
+ JobFacet:
+ description: A Job Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ - type: object
+ properties:
+ _deleted:
+ description: set to true to delete a facet
+ type: boolean
+ Job:
+ type: object
+ properties:
+ namespace:
+ description: The namespace containing that job
+ type: string
+ example: my-scheduler-namespace
+ name:
+ description: The unique name for that job within that namespace
+ type: string
+ example: myjob.mytask
Review Comment:
an empty string as namespace is valid?
can the name be an empty string?
##########
docs/open-api/lineage.yaml:
##########
@@ -0,0 +1,281 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+---
+
+openapi: 3.0.2
+info:
+ title: OpenLineage
+ version: 2-0-2
+ description: OpenLineage is an open source **lineage and metadata collection
API** for the data ecosystem.
+ license:
+ name: Apache 2.0
+ url: http://www.apache.org/licenses/LICENSE-2.0.html
+paths:
+ /api/lineage:
+ post:
+ summary: Send an event related to the state of a run
+ description: Updates a run state for a job.
+ operationId: postRunEvent
+ tags:
+ - OpenLineage
+ requestBody:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/RunEvent'
+ - $ref: '#/components/schemas/DatasetEvent'
+ - $ref: '#/components/schemas/JobEvent'
+ responses:
+ 200:
+ description: OK
Review Comment:
You mentioned "429" somewhere, but it is not documented in the API spec?
##########
docs/open-api/lineage.yaml:
##########
@@ -0,0 +1,281 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+---
+
+openapi: 3.0.2
+info:
+ title: OpenLineage
+ version: 2-0-2
+ description: OpenLineage is an open source **lineage and metadata collection
API** for the data ecosystem.
+ license:
+ name: Apache 2.0
+ url: http://www.apache.org/licenses/LICENSE-2.0.html
+paths:
+ /api/lineage:
+ post:
+ summary: Send an event related to the state of a run
+ description: Updates a run state for a job.
+ operationId: postRunEvent
+ tags:
+ - OpenLineage
+ requestBody:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/RunEvent'
+ - $ref: '#/components/schemas/DatasetEvent'
+ - $ref: '#/components/schemas/JobEvent'
+ responses:
+ 200:
+ description: OK
+components:
+ schemas:
+ BaseEvent:
+ type: object
+ properties:
+ eventTime:
+ description: the time the event occurred at
+ type: string
+ format: date-time
+ producer:
+ description: URI identifying the producer of this metadata. For
example this could be a git url with a given tag or sha
+ type: string
+ format: uri
+ example:
https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client
+ schemaURL:
+ description: The JSON Pointer (https://tools.ietf.org/html/rfc6901)
URL to the corresponding version of the schema definition for this RunEvent
+ type: string
+ format: uri
+ example: https://openlineage.io/spec/0-0-1/OpenLineage.json
+ required:
+ - eventTime
+ - producer
+ - schemaURL
+ BaseFacet:
+ description: all fields of the base facet are prefixed with _ to avoid
name conflicts in facets
+ type: object
+ properties:
+ _producer:
+ description: URI identifying the producer of this metadata. For
example this could be a git url with a given tag or sha
+ type: string
+ format: uri
+ example:
https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client
+ _schemaURL:
+ description: The JSON Pointer (https://tools.ietf.org/html/rfc6901)
URL to the corresponding version of the schema definition for this facet
+ type: string
+ format: uri
+ example:
https://openlineage.io/spec/1-0-2/OpenLineage.json#/$defs/BaseFacet
+ additionalProperties: true
+ required:
+ - _producer
+ - _schemaURL
+ RunFacet:
+ description: A Run Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ Run:
+ type: object
+ properties:
+ runId:
+ description: The globally unique ID of the run associated with the
job.
+ type: string
+ format: uuid
+ facets:
+ description: The run facets.
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/RunFacet'
+ required:
+ - runId
+ JobFacet:
+ description: A Job Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ - type: object
+ properties:
+ _deleted:
+ description: set to true to delete a facet
+ type: boolean
+ Job:
+ type: object
+ properties:
+ namespace:
+ description: The namespace containing that job
+ type: string
+ example: my-scheduler-namespace
+ name:
+ description: The unique name for that job within that namespace
+ type: string
+ example: myjob.mytask
+ facets:
+ description: The job facets.
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/JobFacet'
+ required:
+ - namespace
+ - name
+ DatasetFacet:
+ description: A Dataset Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ - type: object
+ properties:
+ _deleted:
+ description: set to true to delete a facet
+ type: boolean
Review Comment:
This "hierarchy" looks like an over design to me.
Can we simply merge the `_deleted` property to `BaseFacet` and mark it
optional?
##########
docs/open-api/lineage.yaml:
##########
@@ -0,0 +1,281 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+---
+
+openapi: 3.0.2
+info:
+ title: OpenLineage
+ version: 2-0-2
+ description: OpenLineage is an open source **lineage and metadata collection
API** for the data ecosystem.
+ license:
+ name: Apache 2.0
+ url: http://www.apache.org/licenses/LICENSE-2.0.html
+paths:
+ /api/lineage:
+ post:
+ summary: Send an event related to the state of a run
+ description: Updates a run state for a job.
+ operationId: postRunEvent
+ tags:
+ - OpenLineage
+ requestBody:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/RunEvent'
+ - $ref: '#/components/schemas/DatasetEvent'
+ - $ref: '#/components/schemas/JobEvent'
+ responses:
+ 200:
+ description: OK
+components:
+ schemas:
+ BaseEvent:
+ type: object
+ properties:
+ eventTime:
+ description: the time the event occurred at
+ type: string
+ format: date-time
+ producer:
+ description: URI identifying the producer of this metadata. For
example this could be a git url with a given tag or sha
+ type: string
+ format: uri
+ example:
https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client
+ schemaURL:
+ description: The JSON Pointer (https://tools.ietf.org/html/rfc6901)
URL to the corresponding version of the schema definition for this RunEvent
+ type: string
+ format: uri
+ example: https://openlineage.io/spec/0-0-1/OpenLineage.json
+ required:
+ - eventTime
+ - producer
+ - schemaURL
+ BaseFacet:
+ description: all fields of the base facet are prefixed with _ to avoid
name conflicts in facets
+ type: object
+ properties:
+ _producer:
+ description: URI identifying the producer of this metadata. For
example this could be a git url with a given tag or sha
+ type: string
+ format: uri
+ example:
https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client
+ _schemaURL:
+ description: The JSON Pointer (https://tools.ietf.org/html/rfc6901)
URL to the corresponding version of the schema definition for this facet
+ type: string
+ format: uri
+ example:
https://openlineage.io/spec/1-0-2/OpenLineage.json#/$defs/BaseFacet
+ additionalProperties: true
+ required:
+ - _producer
+ - _schemaURL
+ RunFacet:
+ description: A Run Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ Run:
+ type: object
+ properties:
+ runId:
+ description: The globally unique ID of the run associated with the
job.
+ type: string
+ format: uuid
+ facets:
+ description: The run facets.
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/RunFacet'
+ required:
+ - runId
+ JobFacet:
+ description: A Job Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ - type: object
+ properties:
+ _deleted:
+ description: set to true to delete a facet
+ type: boolean
+ Job:
+ type: object
+ properties:
+ namespace:
+ description: The namespace containing that job
+ type: string
+ example: my-scheduler-namespace
+ name:
+ description: The unique name for that job within that namespace
+ type: string
+ example: myjob.mytask
+ facets:
+ description: The job facets.
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/JobFacet'
+ required:
+ - namespace
+ - name
+ DatasetFacet:
+ description: A Dataset Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ - type: object
+ properties:
+ _deleted:
+ description: set to true to delete a facet
+ type: boolean
+ Dataset:
+ type: object
+ properties:
+ namespace:
+ description: The namespace containing that dataset
+ type: string
+ example: my-datasource-namespace
+ name:
+ description: The unique name for that dataset within that namespace
+ type: string
+ example: instance.schema.table
+ facets:
+ description: The facets for this dataset
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/DatasetFacet'
+ required:
+ - namespace
+ - name
+ InputDatasetFacet:
+ description: An Input Dataset Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ InputDataset:
+ description: An input dataset
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/Dataset'
+ - type: object
+ properties:
+ inputFacets:
+ description: The input facets for this dataset.
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/InputDatasetFacet'
+ OutputDatasetFacet:
+ description: An Output Dataset Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ OutputDataset:
+ description: An output dataset
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/Dataset'
+ - type: object
+ properties:
+ outputFacets:
+ description: The output facets for this dataset
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/OutputDatasetFacet'
+ RunEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseEvent'
+ - type: object
+ properties:
+ eventType:
+ description: the current transition of the run state. It is
required to issue 1 START event and 1 of [ COMPLETE, ABORT, FAIL ] event per
run. Additional events with OTHER eventType can be added to the same run. For
example to send additional metadata after the run is complete
+ type: string
+ enum:
+ - START
+ - RUNNING
+ - COMPLETE
+ - ABORT
+ - FAIL
+ - OTHER
+ example: START|RUNNING|COMPLETE|ABORT|FAIL|OTHER
+ run:
+ $ref: '#/components/schemas/Run'
+ job:
+ $ref: '#/components/schemas/Job'
+ inputs:
+ description: The set of **input** datasets.
+ type: array
+ items:
+ $ref: '#/components/schemas/InputDataset'
+ outputs:
+ description: The set of **output** datasets.
+ type: array
+ items:
+ $ref: '#/components/schemas/OutputDataset'
+ required:
+ - run
+ - job
+ StaticDataset:
+ description: A Dataset sent within static metadata events
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/Dataset'
Review Comment:
The "StaticDataset" type is redundant?
##########
docs/lineage/gravitino-server-lineage.md:
##########
@@ -0,0 +1,56 @@
+---
+title: "Gravitino server Lineage support"
+slug: /lineage/gravitino-server-lineage
+keyword: Gravitino OpenLineage
+license: "This software is licensed under the Apache License version 2."
+---
+
+## Overview
+
+Gravitino server provides a pluginable lineage framework to receive, process,
and sink OpenLineage events. By leveraging this, you could do custom process
for the lineage event and sink to your dedicated systems.
+
+## Lineage Configuration
+
+| Configuration item | Description
| Default value | Required |
Since Version |
+|-----------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|----------|---------------|
+| `gravitino.lineage.source` | The name of lineage event
source. The default `http` event source will .
| http | No
| 0.9.0 |
+| `gravitino.lineage.${sourceName}.sourceClass` | The name of the lineage
source class which should implement
`org.apache.gravitino.lineage.source.LineageSource` interface.
| (none)
| No | 0.9.0 |
+| `gravitino.lineage.processorClass` | The name of the lineage
processor class which should implement
`org.apache.gravitino.lineage.processor.LineageProcessor` interface. The
default noop processor will do nothing about the run event. |
`org.apache.gravitino.lineage.processor.NoopProcessor` | No | 0.9.0
|
+| `gravitino.lineage.sinks` | The name of lineage event
sinks.
| log | No
| 0.9.0 |
+| `gravitino.lineage.${sinkName}.sinkClass` | The name of the lineage sink
class which should implement `org.apache.gravitino.lineage.sink.LineageSink`
interface.
| (none) | No
| 0.9.0 |
+| `gravitino.lineage.queueCapacity` | The total capacity of
lineage event queues. If there are multi lineage sinks, the sinks will use an
isolated event queue with the capacity of `gravitino.lineage.queueCapacity` div
the num of sinks. | 10000 | No
| 0.9.0 |
Review Comment:
div -> divided by
##########
docs/open-api/lineage.yaml:
##########
@@ -0,0 +1,281 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+---
+
+openapi: 3.0.2
+info:
+ title: OpenLineage
+ version: 2-0-2
+ description: OpenLineage is an open source **lineage and metadata collection
API** for the data ecosystem.
+ license:
+ name: Apache 2.0
+ url: http://www.apache.org/licenses/LICENSE-2.0.html
+paths:
+ /api/lineage:
+ post:
+ summary: Send an event related to the state of a run
+ description: Updates a run state for a job.
+ operationId: postRunEvent
+ tags:
+ - OpenLineage
+ requestBody:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/RunEvent'
+ - $ref: '#/components/schemas/DatasetEvent'
+ - $ref: '#/components/schemas/JobEvent'
+ responses:
+ 200:
+ description: OK
Review Comment:
This response doesn't have a schema?
##########
docs/open-api/lineage.yaml:
##########
@@ -0,0 +1,281 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+---
+
+openapi: 3.0.2
+info:
+ title: OpenLineage
+ version: 2-0-2
+ description: OpenLineage is an open source **lineage and metadata collection
API** for the data ecosystem.
+ license:
+ name: Apache 2.0
+ url: http://www.apache.org/licenses/LICENSE-2.0.html
+paths:
+ /api/lineage:
+ post:
+ summary: Send an event related to the state of a run
+ description: Updates a run state for a job.
+ operationId: postRunEvent
+ tags:
+ - OpenLineage
+ requestBody:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/RunEvent'
+ - $ref: '#/components/schemas/DatasetEvent'
+ - $ref: '#/components/schemas/JobEvent'
+ responses:
+ 200:
+ description: OK
+components:
+ schemas:
+ BaseEvent:
+ type: object
+ properties:
+ eventTime:
+ description: the time the event occurred at
+ type: string
+ format: date-time
+ producer:
+ description: URI identifying the producer of this metadata. For
example this could be a git url with a given tag or sha
+ type: string
+ format: uri
+ example:
https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client
+ schemaURL:
+ description: The JSON Pointer (https://tools.ietf.org/html/rfc6901)
URL to the corresponding version of the schema definition for this RunEvent
+ type: string
+ format: uri
+ example: https://openlineage.io/spec/0-0-1/OpenLineage.json
+ required:
+ - eventTime
+ - producer
+ - schemaURL
+ BaseFacet:
+ description: all fields of the base facet are prefixed with _ to avoid
name conflicts in facets
+ type: object
+ properties:
+ _producer:
+ description: URI identifying the producer of this metadata. For
example this could be a git url with a given tag or sha
+ type: string
+ format: uri
+ example:
https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client
+ _schemaURL:
+ description: The JSON Pointer (https://tools.ietf.org/html/rfc6901)
URL to the corresponding version of the schema definition for this facet
+ type: string
+ format: uri
+ example:
https://openlineage.io/spec/1-0-2/OpenLineage.json#/$defs/BaseFacet
+ additionalProperties: true
+ required:
+ - _producer
+ - _schemaURL
+ RunFacet:
+ description: A Run Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ Run:
+ type: object
+ properties:
+ runId:
+ description: The globally unique ID of the run associated with the
job.
+ type: string
+ format: uuid
+ facets:
+ description: The run facets.
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/RunFacet'
+ required:
+ - runId
+ JobFacet:
+ description: A Job Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ - type: object
+ properties:
+ _deleted:
+ description: set to true to delete a facet
+ type: boolean
+ Job:
+ type: object
+ properties:
+ namespace:
+ description: The namespace containing that job
+ type: string
+ example: my-scheduler-namespace
+ name:
+ description: The unique name for that job within that namespace
+ type: string
+ example: myjob.mytask
+ facets:
+ description: The job facets.
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/JobFacet'
+ required:
+ - namespace
+ - name
+ DatasetFacet:
+ description: A Dataset Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ - type: object
+ properties:
+ _deleted:
+ description: set to true to delete a facet
+ type: boolean
+ Dataset:
+ type: object
+ properties:
+ namespace:
+ description: The namespace containing that dataset
+ type: string
+ example: my-datasource-namespace
+ name:
+ description: The unique name for that dataset within that namespace
+ type: string
+ example: instance.schema.table
+ facets:
+ description: The facets for this dataset
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/DatasetFacet'
+ required:
+ - namespace
+ - name
+ InputDatasetFacet:
+ description: An Input Dataset Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ InputDataset:
+ description: An input dataset
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/Dataset'
+ - type: object
+ properties:
+ inputFacets:
+ description: The input facets for this dataset.
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/InputDatasetFacet'
+ OutputDatasetFacet:
+ description: An Output Dataset Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ OutputDataset:
+ description: An output dataset
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/Dataset'
+ - type: object
+ properties:
+ outputFacets:
+ description: The output facets for this dataset
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/OutputDatasetFacet'
+ RunEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseEvent'
+ - type: object
+ properties:
+ eventType:
+ description: the current transition of the run state. It is
required to issue 1 START event and 1 of [ COMPLETE, ABORT, FAIL ] event per
run. Additional events with OTHER eventType can be added to the same run. For
example to send additional metadata after the run is complete
+ type: string
+ enum:
+ - START
+ - RUNNING
+ - COMPLETE
+ - ABORT
+ - FAIL
+ - OTHER
+ example: START|RUNNING|COMPLETE|ABORT|FAIL|OTHER
Review Comment:
The example is bad.
##########
docs/open-api/lineage.yaml:
##########
@@ -0,0 +1,281 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+---
+
+openapi: 3.0.2
+info:
+ title: OpenLineage
+ version: 2-0-2
+ description: OpenLineage is an open source **lineage and metadata collection
API** for the data ecosystem.
+ license:
+ name: Apache 2.0
+ url: http://www.apache.org/licenses/LICENSE-2.0.html
+paths:
+ /api/lineage:
+ post:
+ summary: Send an event related to the state of a run
+ description: Updates a run state for a job.
+ operationId: postRunEvent
+ tags:
+ - OpenLineage
+ requestBody:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/RunEvent'
+ - $ref: '#/components/schemas/DatasetEvent'
+ - $ref: '#/components/schemas/JobEvent'
+ responses:
+ 200:
+ description: OK
+components:
+ schemas:
+ BaseEvent:
+ type: object
+ properties:
+ eventTime:
+ description: the time the event occurred at
+ type: string
+ format: date-time
+ producer:
+ description: URI identifying the producer of this metadata. For
example this could be a git url with a given tag or sha
+ type: string
+ format: uri
+ example:
https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client
+ schemaURL:
+ description: The JSON Pointer (https://tools.ietf.org/html/rfc6901)
URL to the corresponding version of the schema definition for this RunEvent
+ type: string
+ format: uri
+ example: https://openlineage.io/spec/0-0-1/OpenLineage.json
+ required:
+ - eventTime
+ - producer
+ - schemaURL
+ BaseFacet:
+ description: all fields of the base facet are prefixed with _ to avoid
name conflicts in facets
+ type: object
+ properties:
+ _producer:
+ description: URI identifying the producer of this metadata. For
example this could be a git url with a given tag or sha
+ type: string
+ format: uri
+ example:
https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client
+ _schemaURL:
+ description: The JSON Pointer (https://tools.ietf.org/html/rfc6901)
URL to the corresponding version of the schema definition for this facet
+ type: string
+ format: uri
+ example:
https://openlineage.io/spec/1-0-2/OpenLineage.json#/$defs/BaseFacet
+ additionalProperties: true
+ required:
+ - _producer
+ - _schemaURL
+ RunFacet:
+ description: A Run Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ Run:
+ type: object
+ properties:
+ runId:
+ description: The globally unique ID of the run associated with the
job.
+ type: string
+ format: uuid
+ facets:
+ description: The run facets.
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/RunFacet'
+ required:
+ - runId
+ JobFacet:
+ description: A Job Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ - type: object
+ properties:
+ _deleted:
+ description: set to true to delete a facet
+ type: boolean
+ Job:
+ type: object
+ properties:
+ namespace:
+ description: The namespace containing that job
+ type: string
+ example: my-scheduler-namespace
+ name:
+ description: The unique name for that job within that namespace
+ type: string
+ example: myjob.mytask
+ facets:
+ description: The job facets.
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/JobFacet'
+ required:
+ - namespace
+ - name
+ DatasetFacet:
+ description: A Dataset Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ - type: object
+ properties:
+ _deleted:
+ description: set to true to delete a facet
+ type: boolean
+ Dataset:
+ type: object
+ properties:
+ namespace:
+ description: The namespace containing that dataset
+ type: string
+ example: my-datasource-namespace
+ name:
+ description: The unique name for that dataset within that namespace
+ type: string
+ example: instance.schema.table
+ facets:
+ description: The facets for this dataset
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/DatasetFacet'
+ required:
+ - namespace
+ - name
+ InputDatasetFacet:
+ description: An Input Dataset Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ InputDataset:
+ description: An input dataset
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/Dataset'
+ - type: object
+ properties:
+ inputFacets:
+ description: The input facets for this dataset.
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/InputDatasetFacet'
+ OutputDatasetFacet:
+ description: An Output Dataset Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ OutputDataset:
+ description: An output dataset
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/Dataset'
+ - type: object
+ properties:
+ outputFacets:
+ description: The output facets for this dataset
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/OutputDatasetFacet'
+ RunEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseEvent'
+ - type: object
+ properties:
+ eventType:
+ description: the current transition of the run state. It is
required to issue 1 START event and 1 of [ COMPLETE, ABORT, FAIL ] event per
run. Additional events with OTHER eventType can be added to the same run. For
example to send additional metadata after the run is complete
+ type: string
+ enum:
+ - START
+ - RUNNING
+ - COMPLETE
+ - ABORT
+ - FAIL
+ - OTHER
+ example: START|RUNNING|COMPLETE|ABORT|FAIL|OTHER
+ run:
+ $ref: '#/components/schemas/Run'
+ job:
+ $ref: '#/components/schemas/Job'
+ inputs:
+ description: The set of **input** datasets.
+ type: array
+ items:
+ $ref: '#/components/schemas/InputDataset'
+ outputs:
+ description: The set of **output** datasets.
+ type: array
+ items:
+ $ref: '#/components/schemas/OutputDataset'
+ required:
+ - run
+ - job
+ StaticDataset:
+ description: A Dataset sent within static metadata events
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/Dataset'
+ DatasetEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseEvent'
+ - type: object
+ properties:
+ dataset:
+ $ref: '#/components/schemas/StaticDataset'
+ required:
+ - dataset
+ not:
+ required:
+ - job
+ - run
Review Comment:
What does this mean?
##########
docs/open-api/lineage.yaml:
##########
@@ -0,0 +1,281 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+---
+
+openapi: 3.0.2
+info:
+ title: OpenLineage
+ version: 2-0-2
+ description: OpenLineage is an open source **lineage and metadata collection
API** for the data ecosystem.
+ license:
+ name: Apache 2.0
+ url: http://www.apache.org/licenses/LICENSE-2.0.html
+paths:
+ /api/lineage:
+ post:
+ summary: Send an event related to the state of a run
+ description: Updates a run state for a job.
+ operationId: postRunEvent
+ tags:
+ - OpenLineage
+ requestBody:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/RunEvent'
+ - $ref: '#/components/schemas/DatasetEvent'
+ - $ref: '#/components/schemas/JobEvent'
+ responses:
+ 200:
+ description: OK
+components:
+ schemas:
+ BaseEvent:
+ type: object
+ properties:
+ eventTime:
+ description: the time the event occurred at
+ type: string
+ format: date-time
+ producer:
+ description: URI identifying the producer of this metadata. For
example this could be a git url with a given tag or sha
+ type: string
+ format: uri
+ example:
https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client
+ schemaURL:
+ description: The JSON Pointer (https://tools.ietf.org/html/rfc6901)
URL to the corresponding version of the schema definition for this RunEvent
+ type: string
+ format: uri
+ example: https://openlineage.io/spec/0-0-1/OpenLineage.json
+ required:
+ - eventTime
+ - producer
+ - schemaURL
+ BaseFacet:
+ description: all fields of the base facet are prefixed with _ to avoid
name conflicts in facets
+ type: object
+ properties:
+ _producer:
+ description: URI identifying the producer of this metadata. For
example this could be a git url with a given tag or sha
+ type: string
+ format: uri
+ example:
https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client
+ _schemaURL:
+ description: The JSON Pointer (https://tools.ietf.org/html/rfc6901)
URL to the corresponding version of the schema definition for this facet
+ type: string
+ format: uri
+ example:
https://openlineage.io/spec/1-0-2/OpenLineage.json#/$defs/BaseFacet
+ additionalProperties: true
+ required:
+ - _producer
+ - _schemaURL
+ RunFacet:
+ description: A Run Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ Run:
+ type: object
+ properties:
+ runId:
+ description: The globally unique ID of the run associated with the
job.
+ type: string
+ format: uuid
+ facets:
+ description: The run facets.
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/RunFacet'
+ required:
+ - runId
+ JobFacet:
+ description: A Job Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ - type: object
+ properties:
+ _deleted:
+ description: set to true to delete a facet
+ type: boolean
+ Job:
+ type: object
+ properties:
+ namespace:
+ description: The namespace containing that job
+ type: string
+ example: my-scheduler-namespace
+ name:
+ description: The unique name for that job within that namespace
+ type: string
+ example: myjob.mytask
+ facets:
+ description: The job facets.
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/JobFacet'
+ required:
+ - namespace
+ - name
+ DatasetFacet:
+ description: A Dataset Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ - type: object
+ properties:
+ _deleted:
+ description: set to true to delete a facet
+ type: boolean
+ Dataset:
+ type: object
+ properties:
+ namespace:
+ description: The namespace containing that dataset
+ type: string
+ example: my-datasource-namespace
+ name:
+ description: The unique name for that dataset within that namespace
+ type: string
+ example: instance.schema.table
+ facets:
+ description: The facets for this dataset
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/DatasetFacet'
+ required:
+ - namespace
+ - name
+ InputDatasetFacet:
+ description: An Input Dataset Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ InputDataset:
+ description: An input dataset
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/Dataset'
+ - type: object
+ properties:
+ inputFacets:
+ description: The input facets for this dataset.
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/InputDatasetFacet'
+ OutputDatasetFacet:
+ description: An Output Dataset Facet
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/BaseFacet'
+ OutputDataset:
+ description: An output dataset
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/Dataset'
+ - type: object
+ properties:
+ outputFacets:
+ description: The output facets for this dataset
+ type: object
+ anyOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/OutputDatasetFacet'
+ RunEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseEvent'
+ - type: object
+ properties:
+ eventType:
+ description: the current transition of the run state. It is
required to issue 1 START event and 1 of [ COMPLETE, ABORT, FAIL ] event per
run. Additional events with OTHER eventType can be added to the same run. For
example to send additional metadata after the run is complete
+ type: string
+ enum:
+ - START
+ - RUNNING
+ - COMPLETE
+ - ABORT
+ - FAIL
+ - OTHER
+ example: START|RUNNING|COMPLETE|ABORT|FAIL|OTHER
+ run:
+ $ref: '#/components/schemas/Run'
+ job:
+ $ref: '#/components/schemas/Job'
+ inputs:
+ description: The set of **input** datasets.
+ type: array
+ items:
+ $ref: '#/components/schemas/InputDataset'
+ outputs:
+ description: The set of **output** datasets.
+ type: array
+ items:
+ $ref: '#/components/schemas/OutputDataset'
+ required:
+ - run
+ - job
+ StaticDataset:
+ description: A Dataset sent within static metadata events
+ type: object
+ allOf:
+ - $ref: '#/components/schemas/Dataset'
+ DatasetEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseEvent'
+ - type: object
+ properties:
+ dataset:
+ $ref: '#/components/schemas/StaticDataset'
+ required:
+ - dataset
+ not:
+ required:
+ - job
+ - run
+ JobEvent:
+ allOf:
+ - $ref: '#/components/schemas/BaseEvent'
+ - type: object
+ properties:
+ job:
+ $ref: '#/components/schemas/Job'
+ inputs:
+ description: The set of **input** datasets.
+ type: array
+ items:
+ $ref: '#/components/schemas/InputDataset'
+ outputs:
+ description: The set of **output** datasets.
+ type: array
+ items:
+ $ref: '#/components/schemas/OutputDataset'
+ required:
+ - job
+ not:
+ required:
+ - run
Review Comment:
What's this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]