> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Lineage

> Query, create, delete, and export data lineage between entities

# Lineage

The Lineage API lets you manage data lineage relationships between any two entities in OpenMetadata. Lineage captures how data flows from sources to destinations, including column-level mappings and pipeline references.

## Available Endpoints

<CardGroup cols={2}>
  <Card title="Get Lineage" icon="diagram-project" href="/v1.12.x/api-reference/lineage/get">
    Retrieve the lineage graph for an entity by ID or fully qualified name, with configurable upstream and downstream depth.
  </Card>

  <Card title="Add Lineage" icon="plus" href="/v1.12.x/api-reference/lineage/add">
    Create a lineage edge between two entities with optional column-level mappings, pipeline references, and SQL queries.
  </Card>

  <Card title="Delete Lineage" icon="trash" href="/v1.12.x/api-reference/lineage/delete">
    Remove a lineage edge between two entities.
  </Card>

  <Card title="Export Lineage" icon="file-export" href="/v1.12.x/api-reference/lineage/export">
    Export the lineage graph for an entity as CSV.
  </Card>
</CardGroup>

## Supported Entity Types

Lineage can be established between **any** entity types in OpenMetadata. Common combinations include:

| From     | To        | Example                                              |
| -------- | --------- | ---------------------------------------------------- |
| Table    | Table     | ETL transformations between source and target tables |
| Table    | Dashboard | Dashboards consuming data from tables                |
| Pipeline | Table     | Pipelines producing data into tables                 |
| Topic    | Table     | Streaming data from Kafka topics into tables         |
| Table    | ML Model  | Tables used as training data for ML models           |

## Key Concepts

* **Edge**: A directional lineage relationship from one entity to another
* **Column-level lineage**: Mapping specific columns from a source entity to columns in a target entity
* **Pipeline reference**: Associating a pipeline entity that powers the transformation
* **Upstream/Downstream depth**: Controls how many hops to traverse when querying the lineage graph
