> ## 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.

# How Column-Level Lineage Works | Official Documentation

> View column-level lineage to trace transformations and dependencies for data quality, debugging, and impact analysis.

# How Column-Level Lineage Works

Column-level lineage shows how individual columns move between tables. Use it to:

* Understand how one table relates to another.
* Run impact analysis before you change a column.
* Trace where a column comes from and what depends on it.

OpenMetadata can generate this lineage automatically. You can also edit it by hand to add anything that is not detected.

![Column-level lineage with the Column layer selected and columns listed on each node](https://mintcdn.com/openmetadata/h8H4B064TddCbaqS/public/images/how-to-guides/lineage/lineage-column-layer.png?fit=max\&auto=format\&n=h8H4B064TddCbaqS\&q=85\&s=bf954ae30030756c3a28c9a25c208f26)

## View Column-Level Lineage

To see the column-level lineage of a table:

1. From the left navigation bar, select **Explore**, or use the search bar at the top.

2. Open the table you want to inspect.

3. Select the **Lineage** tab.

   ![Lineage tab on a table page](https://mintcdn.com/openmetadata/DGjlVQ1UTH-GLlu5/public/images/how-to-guides/lineage/column-lineage-tab.png?fit=max\&auto=format\&n=DGjlVQ1UTH-GLlu5\&q=85\&s=e1233a930a2e017387cd459dd10f1ede)

4. Select the **Layers** button and turn on **Column**. Each table in the graph now lists its columns.

5. Select a column to follow it through the graph.

> [!TIP]
>
> **Quick Tip**: Expand a table in the graph to see all its columns.

If a table shows no column links, generate them with a Lineage Agent (see the next section) or add them by hand.

## Generate Column-Level Lineage Automatically

Run a **Lineage Agent** on the database service that holds the tables:

1. Open the database service, then select the **Agents** tab.

2. Select **Add Agent** > **Lineage**.

   ![Add Agent menu with Lineage highlighted](https://mintcdn.com/openmetadata/GIhJhQEz-bXdMLzp/public/images/v2.1.x/connectors/agents/add-agent-lineage.png?fit=max\&auto=format\&n=GIhJhQEz-bXdMLzp\&q=85\&s=4fb21b7b790ce4acf491ae63461caba3)

3. Configure the agent, then save it.

4. On the **Agents** tab, find the Lineage Agent and select **Run**.

   ![Run button for an agent on the Agents tab](https://mintcdn.com/openmetadata/DGjlVQ1UTH-GLlu5/public/images/how-to-guides/lineage/column-lineage-run-agent.png?fit=max\&auto=format\&n=DGjlVQ1UTH-GLlu5\&q=85\&s=67b3b32a4e81c73700ed48efd9ce2ca8)

When the run finishes, open the table's **Lineage** tab to see the new links.

## Manually Edit Column Level Lineage

OpenMetadata supports manual editing of both table-level and column-level lineage. Use it to add links that are not detected automatically.

To link columns by hand:

1. Open the table and select the **Lineage** tab.

2. Show the columns on the node, either by expanding the node or by turning on the **Column** layer under **Layers**.

3. On the column you want to link, open the **Lineage options** menu and select **Edit Upstream** or **Edit Downstream**. A panel slides out.

   ![Column row with the Lineage options button highlighted](https://mintcdn.com/openmetadata/h8H4B064TddCbaqS/public/images/how-to-guides/lineage/lineage-column-menu-button.png?fit=max\&auto=format\&n=h8H4B064TddCbaqS\&q=85\&s=fa2aa3198c38db88e7737971a8ef3758)

   ![Lineage options menu on a column with Edit Upstream and Edit Downstream](https://mintcdn.com/openmetadata/h8H4B064TddCbaqS/public/images/how-to-guides/lineage/lineage-column-menu.png?fit=max\&auto=format\&n=h8H4B064TddCbaqS\&q=85\&s=9873a881c0330905aa8a071312459094)

4. In the panel, set the following fields:
   * **Select Asset**: Select the asset that holds the other column. The asset must already be on the graph.
   * **Select Column**: The column in that asset to link to.

5. Click **Add** to create the link. Click **Cancel** to close the panel without saving.

6. Repeat for each column you want to link.

![Add Upstream panel for a column with the Select Asset list](https://mintcdn.com/openmetadata/h8H4B064TddCbaqS/public/images/how-to-guides/lineage/lineage-column-picker.png?fit=max\&auto=format\&n=h8H4B064TddCbaqS\&q=85\&s=ac673c4994e759fec818cb023fd8719b)

To remove a column link, select the edge to open its details, then use **Actions** > **Delete**. You can also select the edge and press **Delete** or **Backspace**.

## Metric Column Lineage

A metric is often calculated from a single column. Link the column to the metric so the lineage shows exactly which field feeds the metric. For example, link `sales.amount` to the metric `Total Sales`.

* **Direction**: Connect a column to a metric (column feeds the metric), or a metric to a column.
* **Endpoint**: A metric has no columns of its own. In column-level lineage, the metric appears as one connection point that carries the metric's own name.
* **Impact Analysis**: The column-to-metric link also appears in the column-level Impact Analysis view, so you can see which metrics depend on a column before you change it.

To remove the link, select the edge on the **Lineage** tab and use **Actions** > **Delete**.

> [!NOTE]
>
> You can also create these links with the API by adding a `columnsLineage` entry whose `toColumn` is the metric's fully qualified name.

> [card] [How to Manually Add or Edit Lineage](https://docs.open-metadata.org/v2.1.x/how-to-guides/data-lineage/manual.md)
>
> Edit the table and column level lineage manually.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.