> ## 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 Data Products from dbt | OpenMetadata Data Product Assignment Guide

> Assign dbt models to OpenMetadata Data Products by declaring them in the dbt meta field. Learn the schema.yml syntax, requirements, and error handling.

# Ingest Data Products from dbt

Assign tables to Data Products from your dbt project. List the Data Products under `meta.openmetadata.dataProducts` in your dbt model. During dbt ingestion, OpenMetadata adds the table as an asset of each listed Data Product.

A Data Product is a curated group of data assets that is managed and shared as a single unit. To learn more, see [Data Products](/v2.1.x-SNAPSHOT/how-to-guides/data-marketplace/data-products).

## Requirements

The Data Product must already exist in OpenMetadata before ingestion. OpenMetadata never creates Data Products from dbt. If a listed Data Product isn't found, OpenMetadata logs a warning and ingestion continues.

If the Data Product belongs to a Domain, the table's Domain must match it. Otherwise, OpenMetadata rejects the assignment. To set the table's Domain from dbt, see [Ingest Domain from dbt](/v2.1.x-SNAPSHOT/connectors/database/dbt/ingest-dbt-domain).

## Steps for Ingesting dbt Data Products

Follow these steps to assign tables to Data Products from dbt.

### 1. Create or Select a Data Product in OpenMetadata

Create the Data Product in OpenMetadata, or use an existing one. Note its name.

For more information, see [Add a Data Product](/v2.1.x-SNAPSHOT/how-to-guides/data-marketplace/data-products#add-a-data-product).

### 2. Add Data Products in the schema.yml File

Add a list of Data Product names under `model->name->meta->openmetadata->dataProducts` in your `schema.yml` file. A table can belong to more than one Data Product.

For more details on the dbt meta field, see the [dbt documentation](https://docs.getdbt.com/reference/resource-configs/meta).

```yml theme={null}
models:
  - name: customers
    meta:
      openmetadata:
        dataProducts:
          - "Marketing"
          - "Customer360"
    description: This table has basic information about a customer, as well as some derived facts based on a customer's orders
```

After you add the Data Products, run your dbt workflow. The generated `manifest.json` file then reflects the assignment under `node_name->config->meta->openmetadata->dataProducts`.

```json theme={null}
"model.jaffle_shop.customers": {
  "resource_type": "model",
  "database": "dev",
  "schema": "dbt_jaffle",
  "config": {
    "meta": {
      "openmetadata": {
        "dataProducts": ["Marketing", "Customer360"]
      }
    }
  }
}
```

### 3. View the Data Products on Tables

After ingestion, the table appears in the **Assets** of each Data Product. It also shows the Data Products on its details page.

<img src="https://mintcdn.com/openmetadata/HNKkXtF8qHv6RdC2/public/images/features/ingestion/workflows/dbt/dbt-features/dbt-data-products.png?fit=max&auto=format&n=HNKkXtF8qHv6RdC2&q=85&s=a3cca535d72ca5551cbd0559f91d6a4c" alt="Data Products section on a table details page showing the Data Product assigned from dbt" width="2838" height="1630" data-path="public/images/features/ingestion/workflows/dbt/dbt-features/dbt-data-products.png" />

## Validation and Error Handling

| Scenario | Behavior |
| - | - |
| Data Product not found in OpenMetadata | A warning is logged, the Data Product is skipped, and ingestion continues |
| Assignment fails, for example because the table's Domain doesn't match the Data Product's Domain | A warning is logged, the Data Product is skipped, and ingestion continues |
| `dataProducts` not set | No Data Product assignment |
| Workflow re-run | No duplicates. A table already in the Data Product stays as it is |


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