SnapLogic mapping to OpenLineage events
The OpenLineage specification includes three types of events. The SnapLogic data lineage
implementation follows the specification for one, RunEvent. RunEvent
contains information about the pipeline that executed, the run, and inputs and outputs.
The OpenLineage specification defines facets to provide context to lineage metadata. SnapLogic data lineage uses the following facets:
OutputDatasetFacetInputDatasetFacetParentRunFacetColumnLineageFacetSchemaFieldFacet
SnapLogic RunEvent structure
As shown in the following example:
- Key name strings, such as
eventType, are constants that appear in all events. - The
producerand_producerfields include a clickable link to open the pipeline in designer. It includes the pipeline ID. - The
SnapLogicnamespace contains all SnapLogic entities, including pipelines, Snaps, and virtual datasets. - The
<system_name>namespace represents an external endpoint. For example, aPostgresnamespace contains all Postgres entities. - The
<snap_name>: <snap_id>represents a virtual dataset under the SnapLogic namespace. - Schema facets have a
VARCHARdata type anddescriptionvalue of an empty string. External systems ignore these fields.
{
"eventTime": "<run_timestamp>",
"producer": "https://cdn.elastic.snaplogic.com/sl/designer.html?#pipe_snode=<pipeline_snode_id>",
"schemaURL": "https://openlineage.io/spec/1-0-0/OpenLineage.json#/definitions/RunEvent",
"eventType": "COMPLETE",
"run": {
"runId": "<A new uuid created from uuid part of ruuid + snapid. The ruuid's are of the form: orgid_uuid>",
"facets": {
"parent": {
"_producer": "https://cdn.elastic.snaplogic.com/sl/designer.html?#pipe_snode=<pipeline_snode_id>",
"run": {
"runId": "<pipeline_run_id>"
},
"job": {
"namespace": "<system_name>",
"name": "<pipeline_name>"
},
"_schemaURL": "https://openlineage.io/spec/facets/1-0-0/ParentRunFacet.json"
}
}
},
"job": {
"namespace": "SnapLogic",
"name": "<pipeline_name> + ':' + <snap_label> + ':' + <snapid_id>"
},
"inputs": [
{
"namespace": "'SnapLogic' or <system_name>",
"name": "<database_name>.<schema_name>.<table_name>",
"facets": {
"schema": {
"_producer": "https://cdn.elastic.snaplogic.com/sl/designer.html?#pipe_snode=<pipeline_snode_id>",
"_schemaURL": "https://openlineage.io/spec/facets/1-0-0/SchemaDatasetFacet.json",
"fields": [
{
"name": "<column_name>",
"type": "VARCHAR",
"description": ""
}
]
}
}
}
],
"outputs": [
{
"namespace": "'SnapLogic' or <system_name>",
"name": "<database_name>.<schema_name>.<table_name>",
"facets": {
"schema": {
"_producer": "https://cdn.elastic.snaplogic.com/sl/designer.html?#pipe_snode=<pipeline_snode_id>",
"fields": [
{
"name": "<column_name>",
"type": "VARCHAR",
"description": ""
}
],
"_schemaURL": "https://openlineage.io/spec/facets/1-0-0/SchemaDatasetFacet.json"
},
"columnLineage": {
"_producer": "https://cdn.elastic.snaplogic.com/sl/designer.html?#pipe_snode=<pipeline_snode_id>",
"fields": {
"<column_name_in_current_table>": {
"inputFields": [
{
"namespace": "<system_name>",
"name": "<database_name>.<schema_name>.<table_name_of_parent>",
"field": "<column_name_of_parent>"
}
],
"transformationType": "IDENTITY",
"transformationDescription": "<One of 'Mapping' or any of the transformation␣
functions allowed in Snaplogic transform type snaps>",
}
},
"_schemaURL": "https://openlineage.io/spec/facets/1-0-1/ColumnLineageDatasetFacet.json"
}
}
}
]
}