OpenLineage
CsvPath Framework stretches OpenLineage all the way from edge to core
OpenLineage producers capture lineage events as they happen and send them to OpenLineage Consumers, like DataHub, DataDog, Marquez, among others. While manual or generated documentation of lineage patterns is valuable, OpenLineage events are ground-truth about how data is produced and consumed.

CsvPath Framework is an OpenLineage producer. The Framework fires OpenLineage events from built-in event handlers that you run by setting your config.ini file's [listeners] group to include openlineage.
When you add the openlineage group you activate the following event handlers:
file — fires when data is registered under a named-file (this includes live object data, if you are capturing, not only static inbound data files)
paths — fired when a CsvPath Validation Language or ODCS file is loaded to a named-paths group
results — fired by running a named-paths group against a registered data item
result — fires once for each validation rule in the named-paths group
The listeners are configured by default. You simply add the openlineage group to switch them on.
Configuration
All OpenLineage configurations are in config.ini under the [openlineage] section. The config.ini file is typically at config/config.ini of your working directory, or in the config folder of your FlightPath Data or FlightPath Server project.
There are two version of OpenLineage support in CsvPath. Version 1 works well with Marquez and remains available. Version 2 is the default and has improvements that include:
Greater flexibility in names and namespacing
More facets and better use of the standard facets
Support for transfers as first-class output datasets
New projects should always use the v2 support. This page is only about v2. The v1 page is here.
To chose the version set the version key in the config.ini openlineage section:
Basic connection information is handled like this:
Each OpenLineage consumer will have different requirements. The endpoint address isn't always the same, you can run some without an API key, others don't support gzip payloads. See your vender's documentation.
Remember that you can use values in ALL_CAPS to reference OS environment variables or project environment variables set in a project's env.json. I.e. if my api_key = MY_KEY CsvPath Framework would attempt to resolve that to the value of a MY_KEY OS or project env var.
Names and Namespacing
To see OpenLineage working, you only need the configuration above. But to see OpenLineage working for you in your environment tracking your data, you need to pay attention to naming.
The rest of this page is about OpenLineage configuration for interoperable names and namespacing.
In order for your lineage events to tie into upstream and downstream systems, the names and namespaces must match. CsvPath Framework, as an edge data firewall, has to match its downstream data consumers. You can use the sensible defaults, but if your lake or warehouse doesn't recognize the names it defeats the purpose because your data's lineage will be broken.
The naming configuration keys are:
Namespace Pattern
The namespace pattern determines how CsvPath Framework OpenLineage events are namespaced. It is a literal string with interpolated variables wrapped in braces.
A namespace is required, but what it is is up to you. The available variables are:
prefixroot_pathprotocol_root_pathroot_path_separatedroot_name
The prefix is usually a system or environment indicator. csvpath, edge, or test would all be reasonable prefixes. Prefixes are optional.
The root variables, root_path, protocol_root_path, root_path_separated, and root_name, will be the named-entity root set in your config.ini. I.e. the root, based on the job that is being observed, is one of:
Obviously, the URIs above are up to you. These are your project's root paths. When data is registered it goes in the files root and OpenLineage events are built with that destination in the namespace. csvpaths is the root when you load validations in the form of csvpath statements and ODCS schemas. And the [results] archive is where clean data and metadata land at the end of runs.
The permutations of these roots are:
root_path— the plain pathprotocol_root_path— the path, but updated if needed to have afile://or the technically correct azure storage protocol, rather than justazure://root_path_separated— the root path, but with thepath_separatorvalue instead of/or\charactersroot_name— the last path segment of the root path. I.e. for[inputs] files = data/2026/invoicestheroot_nameisinvoices.
Verbs
In order to make a meaningful job name that indicates both what happened and to whom, we can add a verb. These verbs can be whatever makes sense to you. They are optional, as we'll discuss below.
Generally we talk about data being registered so register is the default job_register_verb. Likewise we talk about schemas and validation rules being loaded so they can be applied. The default job_load_verb is simply load.
Run jobs kickoff a job for each of their component csvpath statements. (An XSD, ODCS, or JSON Schema has a csvpath statement, even if it is trivial). Since the main run is applying a named-paths group to some registered data, the default is run_group.
We call the component csvpath statements within a named-paths group instances. The job_run_instance_verb uses run_instance to make it clear the the context is a run, but the event is from a specific csvpath statement instance.
Names
Names are created as literal strings with variable substitution tokens wrapped in braces. The same form as for namespaces.
These names indicate jobs and datasets. For registration there is one verb name and two dataset outputs, one for the registered data and one for its metadata. Likewise with loading.
A run has a verb, but it doesn't have its own output dataset, other than for the manifest data it writes. So for runs we have just two names.
Entities again have the three names:
Verb representing the job
The dataset representing the manifest
Datasets for every file created and every transfer performed
You can use the following tokens in your names:
verb— the action the job doesentity— the name of the named-entity (e.g. for a named-file calledorders, the entity isorders)sep— the value of thepath_separatorkeyinstance— the identity of a csvpath statement (set in its metadata or simply its index within its group)file— the name of a file generated by the run
As you can see, the default adds the literal manifest in the identifiers for the metadata output of a job. You can use any word you like, but the manifest.json is what you're talking about and its name has to be distinct.
Screenshots of OpenLineage
Marquez


DataHub

DataDog



Last updated