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

# Breaking Changes: Lineage

> Lineage access checks, OpenLineage responses, and new lineage APIs in Collate 2.1.

# Lineage

No lineage endpoint is removed, but some writes and reads are now refused. Collate 2.1 changes who may read and write lineage, what an edge may point to, and how the OpenLineage endpoint reports results. This page compares Collate 2.1 with Collate 2.0.8.

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

> [!NOTE]
>
> **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 Collate 2.1, that value must be a pipeline or a stored procedure. Any other entity type, such as a database service, is refused with a `400 Bad Request` error 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.

Collate 2.0.8 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 a service connection, for example.

The upgrade to Collate 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

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

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

| Request | What changes in Collate 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 a `403 Forbidden` error. 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 a `403 Forbidden` error. Nodes the caller cannot view, and edges that touch them, are removed. A pipeline on an edge that the caller cannot view is dropped from the edge. Admins are not checked or filtered. |
| `getPaginationInfo`, `getDataQualityLineage`, and the export and async export requests | The caller needs `ViewBasic` on the starting entity (`fqn`), or the call returns a `403 Forbidden` error. 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 a `403 Forbidden` error. |
| `GET /v1/lineage/getPlatformLineage` | Admin only. Other users get a `403 Forbidden` error 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]
>
> **Breaking.** 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. Otherwise the request fails with a `403 Forbidden` error. 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 Entity Lookup Is Limited to Data Assets

> [!NOTE]
>
> **Breaking.** Affects callers that look up entity types other than data assets in a batch.

`POST /v1/lineage/hydrate` now accepts only the entity types that lineage draws as nodes. They are the following:

* `table`
* `topic`
* `dashboard`
* `dashboardDataModel`
* `chart`
* `pipeline`
* `mlmodel`
* `container`
* `searchIndex`
* `storedProcedure`
* `apiEndpoint`
* `metric`
* `directory`
* `file`
* `spreadsheet`
* `worksheet`

A request that includes any other type, such as a service or a user, returns a `400 Bad Request` error.

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 Bad Request` error applies to the whole request.

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

## OpenLineage Endpoint Reports Unresolved Datasets

> [!NOTE]
>
> **Breaking.** Affects 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 | Collate 2.0.8 | Collate 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 Bad Request` errors and `partial_success` responses. 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.

Instructions for sending OpenLineage events are in the how-to guides. For more information, see [OpenLineage Compatibility](https://docs.getcollate.io/ai-2-0/how-to-guides/data-lineage/openlineage.md).

## Lineage Data Migrations

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

The upgrade makes the following changes:

* 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` is now disabled by default, 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

The lineage change event types are unchanged in Collate 2.1. `entityLineageAdded`, `entityLineageDeleted`, and `entityLineageUpdated` were already available in Collate 2.0 and behave the same way.

## Traversal and Time-Window Semantics

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.

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. The traversal now returns each edge once.

The original behavior is described in the Collate 2.0 breaking changes. For more information, see [Breaking Changes: 1.13 → 2.0](https://docs.getcollate.io/ai-2-0/release-2.0/breaking-changes/overview).

## 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` and `downstreamDepth` | `0` to `3` | `1` |
| `size` | 1 to 1,000 scene nodes | `200` |
| `query_filter` and `includeDeleted` | Optional filters | None |

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

## Model Context Protocol (MCP) Lineage Tool

> [!NOTE]
>
> **Additive.** Affects AI agents that call `get_entity_lineage` on the Collate MCP server.

The Collate MCP server includes the standard metadata tools, so the `get_entity_lineage` tool gains two optional arguments:

* `column` is the fully qualified name of one column. Collate returns only the edges and column mappings that carry that column, 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

The lineage settings, the query-lineage pipeline schema, and the `entityLineage` type have no field changes in Collate 2.1 beyond the schema dialect update. For more information, see [API & Schema](https://docs.getcollate.io/ai-2-0/release-2.1/breaking-changes/api-and-schema.md).


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