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

# Ingest Owner from dbt | Official Documentation

> Configure dbt workflows to ingest owner metadata from dbt models into your governance platform.

# Ingest Owner from dbt

Ingest the model/table owner information from dbt `manifest.json` or `catalog.json` file into openmetadata tables.

The owner can be a user or a team in OpenMetadata.

Follow the link [here](https://docs.getdbt.com/reference/resource-configs/meta) to add the owner to the dbt project's `schema.yml` file

## Requirements

### 1. Owner information in manifest.json file

Openmetadata fetches the owner information from the `manifest.json` file. Below is a sample `manifest.json` file node containing owner information under `node_name->metadata->owner`.

```json theme={null}
"model.jaffle_shop.orders": {
			"metadata": {
				"type": "BASE TABLE",
				"schema": "dbt_jaffle",
				"name": "orders",
				"database": "dev",
				"comment": null,
				"owner": "openmetadata_team"
			}
}
```

### 2. Owner information in catalog.json file

Openmetadata fetches the owner information from the `catalog.json` file. Below is a sample `catalog.json` file node containing owner information under `node_name->metadata->owner`.

```json theme={null}
"model.jaffle_shop.customers": {
      "metadata": {
        "type": "BASE TABLE",
        "schema": "dbt_jaffle",
        "name": "customers",
        "database": "dev",
        "comment": null,
        "owner": "openmetadata"
      },
}
```

### 3. Adding the User or Team to OpenMetadata

The user or team which will be set as the entity owner should be first created in OpenMetadata.

While linking the owner from `manifest.json` or `catalog.json` files to the entity, OpenMetadata first searches for the user if it is present. If the user is not present it searches for the team.

### 4. Adding Multiple Owners to dbt Models

OpenMetadata allows you to define multiple owners (users or teams) for dbt models through the `owner` field under `meta.openmetadata` in your `schema.yml` configuration. This helps reflect shared ownership and collaborative accountability on data assets.

#### Example Configuration

```yaml theme={null}
models:
  - name: customers
    meta:
      openmetadata:
        glossary: [
          'Test_Glossary.term_one',
          'Test_Glossary.term_two.nested_term.more_nested_term',
        ]
        tier: 'Tier.Tier2'
        owner: ['John Doe', 'jane@gmail.com']
    config:
      tags: ["model_tag_one", "model_tag_two"]
```

#### Guidelines

* **Owner Field**: Provide a list of users or team identifiers under owner.
* **User Validation**: Ensure the specified owners (e.g., John Doe, [jane@gmail.com](mailto:jane@gmail.com)) exist in OpenMetadata as valid user or team entities.
* **Overwrite Behavior**: Use the dbtUpdateOwners parameter in your ingestion configuration to control whether this list overwrites existing owners or only applies to unowned assets.

#### Following steps shows adding a User to OpenMetadata:

**1.** Click on the `Users` section from homepage

<img src="https://mintcdn.com/openmetadata/cpYhk0oyurO_-Qc1/public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/click-users-page.png?fit=max&auto=format&n=cpYhk0oyurO_-Qc1&q=85&s=f5bfbb94c4d6955960adfe568aebae41" alt="click-users-page" width="4044" height="1944" data-path="public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/click-users-page.png" />

<img src="https://mintcdn.com/openmetadata/cpYhk0oyurO_-Qc1/public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/click-users-page1.png?fit=max&auto=format&n=cpYhk0oyurO_-Qc1&q=85&s=8d760db261d215eecc9c7cd89bff9ad2" alt="click-users-page" width="4044" height="1944" data-path="public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/click-users-page1.png" />

**2.** Click on the `Add User` button

<img src="https://mintcdn.com/openmetadata/cpYhk0oyurO_-Qc1/public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/click-add-user.png?fit=max&auto=format&n=cpYhk0oyurO_-Qc1&q=85&s=9bca625e106e8537e22ff7a67578475f" alt="click-add-user" width="4044" height="1944" data-path="public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/click-add-user.png" />

3. Enter the details as shown for the user

<Tip>
  If the owner's name in `manifest.json` or `catalog.json` file is `openmetadata`, you need to enter `openmetadata@youremail.com` in the email id section of add user form as shown below.
</Tip>

<img src="https://mintcdn.com/openmetadata/cpYhk0oyurO_-Qc1/public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/add-user-dbt.png?fit=max&auto=format&n=cpYhk0oyurO_-Qc1&q=85&s=107a0910c171abf3b71b91c6dab3debe" alt="add-user-dbt" width="2600" height="2496" data-path="public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/add-user-dbt.png" />

#### Following steps shows adding a Team to OpenMetadata:

**1.** Click on the `Teams` section from homepage

<img src="https://mintcdn.com/openmetadata/cpYhk0oyurO_-Qc1/public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/click-teams-page.png?fit=max&auto=format&n=cpYhk0oyurO_-Qc1&q=85&s=836236d3d124a875299e114c0cee827e" alt="click-teams-page" width="4044" height="1944" data-path="public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/click-teams-page.png" />

<img src="https://mintcdn.com/openmetadata/cpYhk0oyurO_-Qc1/public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/click-teams-page2.png?fit=max&auto=format&n=cpYhk0oyurO_-Qc1&q=85&s=8e5fa031225f3c735881f74c340bf6b6" alt="click-teams-page" width="4044" height="1944" data-path="public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/click-teams-page2.png" />

**2.** Click on the `Add Team` button

<img src="https://mintcdn.com/openmetadata/cpYhk0oyurO_-Qc1/public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/click-add-team.png?fit=max&auto=format&n=cpYhk0oyurO_-Qc1&q=85&s=8e257f17f18237d3e1f4f6936f7c8b88" alt="click-add-team" width="4044" height="1944" data-path="public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/click-add-team.png" />

**3.** Enter the details as shown for the team

<Tip>
  If the owner's name in `manifest.json` or `catalog.json` file is `openmetadata`, you need to enter `openmetadata` in the name section of add team form as shown below.
</Tip>

<img src="https://mintcdn.com/openmetadata/cpYhk0oyurO_-Qc1/public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/add-team-dbt.png?fit=max&auto=format&n=cpYhk0oyurO_-Qc1&q=85&s=dc04fb864697c9cca00be26ff00faaa8" alt="add-team-dbt" width="2600" height="2496" data-path="public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/add-team-dbt.png" />

## Linking the Owner to the table

After running the ingestion workflow with dbt you can see the created user or team getting linked to the table as it's owner as it was specified in the `manifest.json` or `catalog.json` file.

<img src="https://mintcdn.com/openmetadata/cpYhk0oyurO_-Qc1/public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/linked-user.png?fit=max&auto=format&n=cpYhk0oyurO_-Qc1&q=85&s=bf245a0909ea84002d5ea231a00094a1" alt="linked-user" width="1972" height="816" data-path="public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/linked-user.png" />

## Overriding the existing table Owners

To establish a unified and reliable system for owners, a single source of truth is necessary. It either is directly OpenMetadata, if individuals want to go there and keep updating, or if they prefer to keep it centralized in dbt, then we can always rely on that directly.

When the `Update Owners` toggle is enabled during the configuration of dbt ingestion, existing owners of tables will be overwritten with the dbt owners.

If toggle is disabled during the configuration of dbt ingestion, dbt owners will only be updated for tables in OpenMetadata that currently have no owners. Existing owners will remain unchanged and will not be overwritten with dbt owners.

<img src="https://mintcdn.com/openmetadata/cpYhk0oyurO_-Qc1/public/images/features/ingestion/workflows/dbt/dbt-features/dbt-update-owners.webp?fit=max&auto=format&n=cpYhk0oyurO_-Qc1&q=85&s=f7f8831d4c73898c965b2636a997b4b1" alt="update-dbt-owners" width="1500" height="832" data-path="public/images/features/ingestion/workflows/dbt/dbt-features/dbt-update-owners.webp" />
