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

# Cross Database Lineage

> Learn how OpenMetadata resolves lineage across multiple databases or projects without requiring cross-service access.

# Cross Database Lineage

Some connectors support ingesting multiple databases or projects into one service with shared credentials—for example, multiple BigQuery project IDs in one service. Lineage resolves automatically because the metadata exists in the same service.

Other deployments ingest each database or project as a separate service, typically with dedicated credentials. Cross-database lineage is for this model: OpenMetadata resolves references across services without requiring any service account to access another database or project.

## Architecture

For deployments that use a separate service per database or project:

* Each service uses its own dedicated service account or credentials.
* The service account only requires permissions for its own database or project.
* OpenMetadata ingests metadata from each service independently.
* One service account doesn't need access to all databases or projects.

## How Cross Database Lineage Works

During lineage extraction:

1. OpenMetadata parses the query history, view definitions, or stored procedure definitions for the service being ingested.
2. When a query, view, or stored procedure references a table, OpenMetadata resolves that reference by searching the metadata already ingested into OpenMetadata.
3. If the referenced table belongs to another database or project, OpenMetadata searches the metadata from the corresponding service.
4. Once OpenMetadata finds the referenced asset, it creates the lineage relationship.

This applies to query, view, and stored-procedure lineage when the corresponding processing options are enabled.

<Note>
  The lookup happens within OpenMetadata's metadata store. The connector doesn't query across databases or projects, and the service account doesn't require access to assets outside its own database or project.
</Note>

## Configuration

OpenMetadata's lineage options include **Process Cross Database Lineage** and **Cross Database Service Names**. To configure them on an existing Lineage Agent:

1. Navigate to **Settings** > **Services** > **Databases** and select the service running the Lineage Agent.
2. Select the **Agents** tab.
3. On the Lineage Agent, select the three-dot menu.
4. Select **Edit**.
   <img src="https://mintcdn.com/openmetadata/yIQSah3K7TBq25Ab/public/images/features/ingestion/workflows/lineage/edit-lineage-option.png?fit=max&auto=format&n=yIQSah3K7TBq25Ab&q=85&s=f931b6940dcfef8bb9aff41894a5b42f" alt="Edit the Lineage Agent" width="2520" height="1256" data-path="public/images/features/ingestion/workflows/lineage/edit-lineage-option.png" />
5. In the **Configure Ingestion** step, scroll to the following cross-database lineage options:

   * **Process Cross Database Lineage**: Enable this toggle to build lineage across tables in different databases or projects.
   * **Cross Database Service Names**: Names of the other services to search when resolving table references. List the specific service names to search. The underlying search returns a limited number of matches per lookup, so `*` can resolve to the wrong table or miss the correct service when many services or tables share names. Update this list when a new service needs to participate in cross-database lineage.

   <img src="https://mintcdn.com/openmetadata/yIQSah3K7TBq25Ab/public/images/features/ingestion/workflows/lineage/cross-db-lineage-option.png?fit=max&auto=format&n=yIQSah3K7TBq25Ab&q=85&s=e0cd23e005c29613223dc2f45ddb3d47" alt="Configure cross-database lineage options" width="1534" height="1515" data-path="public/images/features/ingestion/workflows/lineage/cross-db-lineage-option.png" />
6. Select **Next** to review the schedule.
7. Select **Submit** to redeploy the Lineage Agent with the updated configuration.

Set **Cross Database Service Names** and other lineage options when adding a new Lineage Agent. For the full list of fields and how to set them, see [Lineage Options](/v1.12.x/how-to-guides/data-lineage/workflow#lineage-options).

## Security Considerations

This architecture follows least-privilege principles:

* Each database or project uses its own dedicated service account.
* Service accounts don't require cross-project or cross-database IAM permissions.
* This model maintains project and database isolation.
* OpenMetadata builds lineage from metadata already ingested, rather than through direct cross-project or cross-database access.
