Skip to content

Commit

Permalink
Standarize custom facet naming (apache#46)
Browse files Browse the repository at this point in the history
* Standarize custom facet naming

Signed-off-by: Maciej Obuchowski <maciej.obuchowski@getindata.com>
  • Loading branch information
mobuchowski authored May 6, 2021
1 parent f31da6a commit 163278f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion spec/OpenLineage.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ Facets are pieces of metadata that can be attached to the core entities:

A facet is an atomic piece of metadata identified by its name. This means that emiting a new facet whith the same name for the same entity replaces the previous facet instance for that entity entirely). It is defined as a JSON object that can be either part of the spec or custom facets defined in a different project.

Custom facets must use a distinct prefix named after the project defining them to avoid colision with standard facets defined in the [OpenLineage.json](OpenLineage.json) spec.
They have a \_schemaURL field pointing to the corresponding version of the facet schema (as a JSONPointer: [$ref URL location](https://swagger.io/docs/specification/using-ref/) ).

Example: https://raw.githubusercontent.com/OpenLineage/OpenLineage/main/spec/OpenLineage.json#/definitions/MyCustomJobFacet
Expand All @@ -91,6 +90,16 @@ The versioned URL must be an immutable pointer to the version of the facet schem

Custom facets can be promoted to the standard by including them in the spec.

#### Custom Facet Naming

Naming of custom facets should follow pattern `{prefix}{name}{entity}Facet` PascalCased.
Prefix must be distinct identifier named after the project defining them to avoid colision with standard facets defined in the [OpenLineage.json](OpenLineage.json) spec.
Entity is the core entity for which the facet is attached.

When attached to core entity, the key should follow pattern `{prefix}_{name}`, where both prefix and name follow snakeCase pattern.

Example of valid name is `BigQueryStatisticsJobFacet` and it's key `bigQuery_statistics`.

### Standard Facets

#### Run Facets
Expand Down

0 comments on commit 163278f

Please sign in to comment.