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

# Breaking Changes - Lineage | Official Documentation

> Lineage access checks, the pipeline rule for lineage edges, OpenLineage responses, batch hydration limits, and the new lineage scene and Model Context Protocol (MCP) lineage arguments in OpenMetadata 2.1.

# Lineage

No lineage endpoint is removed and no lineage field is renamed, so existing lineage ingestion and
dashboards keep working. OpenMetadata 2.1 changes who may read and write lineage, what an edge may point
to, and how the OpenLineage endpoint reports results. Review the entries marked **Breaking** and
**Behavioral** before you upgrade. This matters most if you use custom roles and policies, run your own
lineage scripts, or post OpenLineage events.

## Lineage Edges Can Only Name a Pipeline or Stored Procedure

> [!WARNING]
>
> **Breaking.** Affects scripts, connectors, and integrations that write lineage with a `pipeline` on the edge.

An edge can carry a `pipeline` value that records what moved the data. In OpenMetadata 2.1, that value must be a
pipeline or a stored procedure. Any other entity type, such as a database service, is refused
with `400 Bad Request` and the message `Lineage pipeline must be a pipeline or a storedProcedure, not a <type>`.
This applies to `PUT /v1/lineage`, the by-name `PUT`, and the `PATCH` endpoints.

OpenMetadata 2.0 accepted any entity type. The named entity was copied into the search document of the downstream
entity, which every user can read. That could expose, for example, a service connection.

The upgrade to OpenMetadata 2.1 cleans existing data:

* A data migration clears the `pipeline` value from any existing edge that names something other than a
  pipeline or stored procedure. Each cleared value is written to the server log.
* The copies already stored in the search index are removed when you run the reindex that the upgrade
  requires.

> [!NOTE]
>
> Search your lineage scripts for edges that set `pipeline` to a service or other entity, and send a pipeline
> or stored procedure instead.

> [!WARNING]
>
> If the server log shows a cleared reference to a service, rotate that service's credentials, because the value
> could have been readable before the upgrade.

## Lineage Reads Now Check Permissions

> [!WARNING]
>
> **Breaking for users with restricted roles.** Affects custom policies, API clients, and the lineage graph.

In OpenMetadata 2.0, lineage reads did not check whether the caller could view the entities in the graph. In OpenMetadata 2.1, they do.

| Request | What changes in 2.1 |
| - | - |
| `GET /v1/lineage/{entity}/{id}` and `GET /v1/lineage/{entity}/name/{fqn}` | The caller needs `ViewBasic` on the entity, or the call returns `403`. Nodes the caller cannot view are then removed from the result. |
| `GET /v1/lineage/getLineage`, `getLineage/{direction}`, and `getLineageByEntityCount` | The caller needs `ViewBasic` on the starting entity (`fqn`), or the call returns `403`. Nodes the caller cannot view are removed, and so are the edges that touch them. A pipeline on an edge that the caller cannot view is dropped from the edge. Admins are not checked or filtered. |
| `getPaginationInfo`, `getDataQualityLineage`, `export`, and the async export requests | The caller needs `ViewBasic` on the starting entity (`fqn`), or the call returns `403`. The exports and the data quality lineage also drop nodes the caller cannot view. Pagination information is only checked on the starting entity. |
| `GET /v1/lineage/getLineageEdge/...` (by ID and by name) | The caller needs `ViewBasic` on both ends of the edge, or the call returns `403`. |
| `GET /v1/lineage/getPlatformLineage` | Admin only. Other users get `403` and should use `GET /v1/lineage/scene`. |
| Deleting an edge by name, or all edges of one source by name | The entity lookup now includes soft-deleted entities, so edges to a deleted table can be removed. |

The permission check covers the whole path. A node you cannot view is removed, and so is everything that is
reachable only through it. Two users can therefore see different graphs for the same table.

> [!NOTE]
>
> If a role used to see lineage through an overly narrow policy and now gets an error or a smaller graph, grant
> `ViewBasic` on the affected entities. Anything that read the platform-wide lineage graph with a non-admin
> account must switch to an admin account, or to `GET /v1/lineage/scene`.

### Writing an Edge With a Pipeline Needs View Access to That Pipeline

> [!NOTE]
>
> **Behavioral.** Affects bots and users who add or patch edges.

Besides `EditLineage` on both ends of the edge, the caller now also needs `ViewBasic` on a pipeline or stored
procedure that the request newly attaches to the edge, or the request fails with `403`. This applies to `PUT /v1/lineage`,
the by-name `PUT`, and the `PATCH` endpoints. A pipeline that the stored edge already carries is not checked again, so
repeated ingestion runs are not affected.

> [!NOTE]
>
> Check that your ingestion bot's role includes view access to the pipelines it references.

## Batch Hydration Is Limited to Data Assets

> [!WARNING]
>
> **Breaking for callers that hydrate non-asset types.**

`POST /v1/lineage/hydrate` now accepts only the entity types that lineage draws as nodes: `table`, `topic`,
`dashboard`, `dashboardDataModel`, `chart`, `pipeline`, `mlmodel`, `container`, `searchIndex`, `storedProcedure`,
`apiEndpoint`, `metric`, `directory`, `file`, `spreadsheet`, and `worksheet`. A request that includes any other
type, such as a service or a user, returns `400 Bad Request`.

Each entity is also checked with the view permissions that a normal `GET` of the same fields needs. Entities the
caller cannot view are left out of the response instead of failing the whole batch. The `400` applies to the whole request.

> [!NOTE]
>
> Fetch services, users, and other non-asset types with their own `GET` endpoints.

## OpenLineage Endpoint Reports Unresolved Datasets

> [!WARNING]
>
> **Breaking for OpenLineage producers that treat every response as success.**

`POST /v1/openlineage/lineage` and `POST /v1/openlineage/lineage/batch` now report what they could not resolve.

| Situation | 2.0 | 2.1 |
| - | - | - |
| Some edges created, some datasets not found | `200`, status `success` | `200`, status `partial_success`, with the unmatched datasets in `unresolvedDatasets` |
| Datasets not found and no edge created | `200`, "no lineage edges created" | `400`, status `failure`, with `unresolvedDatasets` |
| Job has no matching pipeline | Not reported | Listed in `unresolvedJobs`. The edges carry no pipeline |
| Batch where every event fails | `200` | `400` |
| Batch with some failures | `200` | `200`, status `partial_success`, with `failedEvents` and a `summary` that includes a `partial` count |

Events that carry no lineage (nothing to resolve) still return `200`.

Entity creation from events also changes:

* Only a Table can be created from an event, together with its missing Database and Database Schema. This
  needs the dataset namespace to be listed in `namespaceToServiceMapping` and the event to carry the table's
  columns in its schema facet.
* A Pipeline is never created from an event. The pipeline of a job is looked up, by the name
  `<namespace>-<job name>`, in the pipeline service you configured.
* Creating anything from an event is now checked like a REST create by the same caller. The caller needs
  `Create` permission on the parent, and plan limits apply.
* `namespaceToServiceMapping` is matched exactly first, then by the longest matching namespace prefix.

> [!NOTE]
>
> Check your producer's error handling for `400` and `partial_success`. Map each dataset namespace in
> `namespaceToServiceMapping`, and create the pipelines you want edges to carry. If you rely on automatic
> creation, give the posting identity permission to create tables.

## Lineage Data Migrations

> [!NOTE]
>
> **Behavioral.** These run automatically during the upgrade to OpenMetadata 2.1.

* Edges that name an unsupported entity as their pipeline are cleaned. The step is safe to run
  again.
* A new index speeds up lookups of edges by pipeline.
* The audit log stores lineage events with a long combined name of two entities. That name column no longer has
  a length limit, so audit entries for deeply nested entities are no longer dropped.
* The built-in Resource Description Framework (RDF) rule `transitive-lineage-closure` now ships disabled, because it stores every
  ancestor and descendant pair and grows quickly with lineage depth. The migration disables it where an earlier
  build had enabled it. Turn it on again from the RDF settings only if you need it.

No lineage table or column is dropped or renamed.

## Lineage Change Events

> [!NOTE]
>
> **No change.** `entityLineageAdded`, `entityLineageDeleted`, and `entityLineageUpdated` were already available in OpenMetadata 2.0
> and behave the same way.

## Traversal and Time-Window Semantics

> [!NOTE]
>
> **No change in meaning.** The `startTime` and `endTime` window still prunes the graph during traversal, so one
> out-of-window edge hides everything reachable only through it. Edges with no timestamps still match any window.
> If you rely on this behavior, refer to the OpenMetadata 2.0 notes.

The database traversal behind `GET /v1/lineage/{entity}/{id}` now expands each entity once, at the shortest distance
that reaches it. The nodes and edges returned within the requested depth do not change, but deep graphs with many
cross links respond much faster and each edge is returned once.

## New Lineage Scene API

> [!NOTE]
>
> **Additive.** Powers the new lineage views in the UI. Nothing existing is replaced.

Send a request like the following:

```http theme={null}
GET /v1/lineage/scene?focusFqn=<fqn>&entityType=<type>&lens=service&band=ASSET
```

| Parameter | Values | Default |
| - | - | - |
| `lens` | `service`, `domain`, `dataProduct` | `service` |
| `band` | `LAYER`, `ASSET`, `FIELD` | `ASSET` |
| `upstreamDepth`, `downstreamDepth` | `0` to `3` | `1` |
| `size` | 1 to 1,000 scene nodes | `200` |
| `query_filter`, `includeDeleted` | Optional filters | None |

`focusFqn` and `entityType` must be sent together or not at all. When you send them, the caller needs `ViewBasic`
on the focus entity or the call returns `403`. The scene is built per caller, so it only contains what the caller may view. An unsupported `lens` or `band` returns `400`.

## Model Context Protocol (MCP) Lineage Tool

> [!NOTE]
>
> **Additive.** Affects AI agents that call `get_entity_lineage`.

The Model Context Protocol (MCP) tool gains two optional arguments:

* `column` is the fully qualified name of one column. Only the edges and column mappings that carry that column
  are returned, followed across renames.
* `cursor` takes the `nextCursor` of a response that has `hasMore` and returns the next page of edges.

`upstreamDepth` and `downstreamDepth` also accept `0` to skip one direction. Responses can now include
`hiddenNodes` (how many nodes were removed because the caller cannot view them) and `hiddenNodesUnchecked`.
A graph with `hiddenNodes` above `0` is a partial view.

## Connector Lineage

> [!NOTE]
>
> **Additive.** For more information, see
> [Ingestion & Connectors](https://docs.open-metadata.org/v2.1.x/deployment/upgrade/breaking-changes/ingestion-and-connectors.md).

The lineage settings, the query-lineage pipeline schema, and the `entityLineage` type have no field changes in OpenMetadata 2.1
beyond the schema dialect update. For more information, see
[API & Schema Contracts](https://docs.open-metadata.org/v2.1.x/deployment/upgrade/breaking-changes/api-and-schema.md).


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