> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcargo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# dbt

> Sync data from your dbt models into Cargo

dbt (data build tool) is the standard for data transformation in modern data stacks. The Cargo integration allows you to pull data from your dbt models directly into Cargo data models.

## Authentication

Connect to dbt Cloud using your API token and account details.

### Connection details

| Field           | Description              |
| --------------- | ------------------------ |
| **API Token**   | Your dbt Cloud API token |
| **Account**     | Your dbt account         |
| **Environment** | Your dbt environment     |

<Tip>
  Generate your API token in dbt Cloud under **Account Settings → API Access**.
</Tip>

***

## Data models

### Fetch model

Pull data from a dbt model into a Cargo data model.

**Configuration**

| Field     | Description                             |
| --------- | --------------------------------------- |
| **Model** | Select the dbt model to sync            |
| **ID**    | Column containing unique record IDs     |
| **Title** | Column containing record display titles |

<Info>
  Cargo dynamically loads available models and columns from your dbt environment.
</Info>

***

## Use cases

<AccordionGroup>
  <Accordion title="Transformed data sync" icon="arrows-rotate">
    Use dbt-transformed data as the source for your Cargo workflows.
  </Accordion>

  <Accordion title="Business metrics" icon="chart-line">
    Pull calculated metrics and aggregations from dbt models.
  </Accordion>

  <Accordion title="Data quality" icon="shield-check">
    Leverage dbt's tested and documented models for reliable data.
  </Accordion>
</AccordionGroup>

***

## Best practices

1. **Use production environment** - Connect to your production dbt environment for stable, tested data
2. **Set proper ID columns** - Choose columns that uniquely identify each record
3. **Document your models** - dbt model descriptions appear in Cargo's model selector
