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

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

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

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

Collate 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

Collate 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 Collate

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

While linking the owner from `manifest.json` or `catalog.json` files to the entity, Collate 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

Collate 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 Collate 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 Collate:

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

<img src="https://mintcdn.com/collatedocs/X_lfH8k8w6u5uqTN/public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/click-users-page.png?fit=max&auto=format&n=X_lfH8k8w6u5uqTN&q=85&s=76aa1ebc13c600b7150f334bbe396f4f" 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/collatedocs/X_lfH8k8w6u5uqTN/public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/click-users-page1.png?fit=max&auto=format&n=X_lfH8k8w6u5uqTN&q=85&s=4855e5f38347ff00f4a5e37879e1f8bd" 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/collatedocs/X_lfH8k8w6u5uqTN/public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/click-add-user.png?fit=max&auto=format&n=X_lfH8k8w6u5uqTN&q=85&s=226259f975df5c5ef39c176c281b8586" 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/collatedocs/X_lfH8k8w6u5uqTN/public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/add-user-dbt.png?fit=max&auto=format&n=X_lfH8k8w6u5uqTN&q=85&s=8e2eaa1bd6ad920f5752b0b70c2db234" 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 Collate:

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

<img src="https://mintcdn.com/collatedocs/X_lfH8k8w6u5uqTN/public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/click-teams-page.png?fit=max&auto=format&n=X_lfH8k8w6u5uqTN&q=85&s=4994d77f3090b8859d2dcef6c3d2d17e" 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/collatedocs/X_lfH8k8w6u5uqTN/public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/click-teams-page2.png?fit=max&auto=format&n=X_lfH8k8w6u5uqTN&q=85&s=49c90e88a64f198e0efa2fc337341291" 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/collatedocs/X_lfH8k8w6u5uqTN/public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/click-add-team.png?fit=max&auto=format&n=X_lfH8k8w6u5uqTN&q=85&s=b121f7981d7063faaf79ee4e8c0dc82d" 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/collatedocs/X_lfH8k8w6u5uqTN/public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/add-team-dbt.png?fit=max&auto=format&n=X_lfH8k8w6u5uqTN&q=85&s=b7f35122594c6ebfef27819df00d2b1c" 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/collatedocs/X_lfH8k8w6u5uqTN/public/images/features/ingestion/workflows/dbt/ingest_dbt_owner/linked-user.png?fit=max&auto=format&n=X_lfH8k8w6u5uqTN&q=85&s=b636c2f4b09aba9d4dd63bb572784e19" 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 Collate, 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 Collate that currently have no owners. Existing owners will remain unchanged and will not be overwritten with dbt owners.

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


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