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

> Assign dbt models to Collate 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, Collate adds the table as an asset of each listed Data Product.

A Data Product is a curated group of data assets managed and shared as a single unit. For more information, see [Data Products](https://docs.getcollate.io/how-to-guides/data-governance/domains-&-data-products/data-products.md).

## Requirements

The Data Product must exist in Collate before ingestion. Collate doesn't create Data Products from dbt. If Collate can't find a listed Data Product, it logs a warning and continues ingestion.

If the Data Product belongs to a Domain, the table's Domain must match it. Otherwise, Collate rejects the assignment. To set the table's Domain from dbt, see [Ingest Domain from dbt](https://docs.getcollate.io/connectors/database/dbt/ingest-dbt-domain.md).

## Steps for Ingesting dbt Data Products

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

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

2. 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 information about the dbt meta field, see [dbt meta documentation](https://docs.getdbt.com/reference/resource-configs/meta).

   ```yml theme={null}
   models:
     - name: customers
       meta:
         openmetadata:
           dataProducts:
             - "Marketing"
             - "Customer360"
       description: This table contains basic customer information and facts derived from customer orders.
   ```

   Run your dbt workflow after you add the Data Products. The generated `manifest.json` file 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. Run Collate dbt ingestion using the regenerated artifacts.

   For more information, see [Configure the dbt Workflow](https://docs.getcollate.io/connectors/database/dbt/configure-dbt-workflow.md).

4. Verify that each Data Product's **Assets** section lists the table.

   The table details page also lists the assigned Data Products.

## Validation and Error Handling

| Scenario | Behavior |
| - | - |
| Data Product not found in Collate | Collate logs a warning, skips the Data Product, and continues ingestion. |
| Assignment fails because the table's Domain doesn't match the Data Product's Domain | Collate logs a warning, skips the Data Product, and continues ingestion. |
| `dataProducts` isn't set | Collate doesn't assign a Data Product. |
| Workflow runs again | Collate doesn't create duplicates. A table already assigned to the Data Product remains assigned. |


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