Publish lineage
Description
The Publish lineage action publishes the pipelines and workflows of a folder to a Lineage Sink without running them: an OpenLineage collector such as Marquez, or DataHub.
Each pipeline and workflow is published with its transforms or actions and the tables and files they declare they read and write, as a run of it would report them:
-
the tables its transforms write, from the transforms that declare them (Table output, Insert/Update, the bulk loaders, …);
-
the tables Table input reads, from its SQL;
-
the files Text file input and CSV input read and Text file output writes.
No runs are recorded: the catalog learns what the pipelines are and what they read and write before, or without, any run reporting it. Put the action at the end of a deployment, so the catalog describes what was deployed.
What the sink writes depends on its type:
-
OpenLineage sends one OpenLineage job event per job: the job, with the datasets it reads and writes, and no run. See Publishing a project without running it.
-
DataHub writes the pipelines (data flows), tasks and datasets, with the layouts of the files as their schemas, and no run instances. The Publish to DataHub action does the same and can publish the documentation of each pipeline and workflow as well.
The same is available on the command line as hop lineage-publish:
hop lineage-publish -j my-project -e prod -s marquez
hop lineage-publish -j my-project -s marquez -f '${PROJECT_HOME}/flows'
Options
| Option | Description |
|---|---|
Action name |
The name of the action. |
Lineage sink |
The Lineage Sink to publish to: the one the runs of the project report to, so publishing and running describe the same jobs and datasets. |
Folder |
The folder with the pipelines and workflows to publish, with its subfolders. The default is |
On the command line, -s (--sink) names the lineage sink and -f (--folder) the folder; -j and -e select the project and environment.
Result
The action succeeds when every pipeline and workflow was read and the sink delivered all of it. It fails when a file can’t be read (the others are still published), or the collector refused or didn’t receive part of it; the log says which, with the collector’s answer. It also fails when the sink is of a type that can’t publish without recording runs.
Notes
-
Names are resolved as a run of each pipeline or workflow resolves them: with the variables of the workflow, the file’s own folder as
'${Internal.Entry.Current.Folder}', and the default values of its parameters. A transform whose table or file can’t be resolved without running (a file name from a field, a connection that doesn’t exist) is published without that dataset. -
Text file input publishes the files that match its file list when the action runs. Text file output with the date or time in its file name publishes no file: no run writes a file of that name.
-
Publishing asks no database for anything.