Skip to main content

Lineage Workflow

Learn how to configure the Lineage workflow from the UI to ingest Lineage data from your data sources.
Check out the documentation of the connector you are using to know if it supports automated lineage workflow.If your database service is not yet supported, you can use this same workflow by providing a Query Log file!Learn how to do so 👇

Lineage Workflow through Query Logs

Configure the lineage workflow by providing a Query Log file.

UI Configuration

Once the metadata ingestion runs correctly and we are able to explore the service Entities, we can add Entity Lineage information. This will populate the Lineage tab from the Table Entity Page. table-entity-page We can create a workflow that will obtain the query log and table creation information from the underlying database and feed it to OpenMetadata. The Lineage Agent will be in charge of obtaining this data.

Step 1: Add a Lineage Agent

Navigate to your service and launch the Lineage Agent wizard.
  1. Navigate to Settings > Services and select the service type.
  2. Click the service you have added.
  3. Open the Agents tab and click Add Agent > Lineage. Add Lineage Agent
  4. Give the agent a recognisable name and click Next.

Step 2: Configure the Agent

Configure the core parameters for this agent. Configure the Lineage Agent Agent Setup Filter Patterns Apply regex patterns to include or exclude specific databases, schemas, tables, or stored procedures. Scope & Behaviour

Step 3: Schedule and Deploy

Choose how the lineage agent should run:
  • Schedule: Runs repeatedly based on a defined interval. Set the Frequency (Hourly, Daily, Weekly, Monthly, or Custom) and the Time to run.
  • On Demand: Runs once when manually triggered.
Configure the remaining options:
  • Number of Retries: How many times to retry if the ingestion fails.
  • Raise on Error: Toggle on to surface errors immediately rather than silently skipping them.
Click Add & Deploy to save and activate the lineage agent. Schedule and Deploy the Lineage Agent

YAML Configuration

In the connectors section we showcase how to run the metadata ingestion from a JSON/YAML file using the Airflow SDK or the CLI via metadata ingest. Running a lineage workflow is also possible using a JSON/YAML configuration file. This is a good option if you wish to execute your workflow via the Airflow SDK or using the CLI; if you use the CLI a lineage workflow can be triggered with the command metadata ingest -c FILENAME.yaml. The serviceConnection config will be specific to your connector (you can find more information in the connectors section), though the sourceConfig for the lineage will be similar across all connectors.

Lineage

After running a Metadata Ingestion workflow, we can run Lineage workflow. While the serviceName will be the same to that was used in Metadata Ingestion, so the ingestion bot can get the serviceConnection details from the server.

1. Define the YAML Config

This is a sample config for Lineage:
  • You can learn more about how to configure and run the Lineage Workflow to extract Lineage data from here

2. Run with the CLI

After saving the YAML config, we will run the command the same way we did for the metadata ingestion: