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

# Defer to Production

> Compile and preview dbt™ models against production state in the Paradime Code IDE, so you build only what changed instead of rebuilding upstream models.

**Defer to Production** lets you develop against your production state. Instead of rebuilding every upstream model in your development schema, dbt™ reads unbuilt `ref()` targets from the latest `manifest.json` of a production [Bolt schedule](/products/bolt/index). This speeds up iteration on downstream models.

Open the selector from the **Defer** control in the bottom panel, next to the **Run** button.

## Options

| Option                                | What it does                                                                                         |
| ------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| **No Defer**                          | Build everything from your local development tables.                                                 |
| **Defer to Production**               | Read from production tables when the upstream node doesn't exist locally.                            |
| **Defer to Production --favor-state** | Read from production tables instead of local development tables, even when the model exists locally. |
| **Defer to schedule**                 | Choose which production Bolt schedule's state to defer to.                                           |

## What it affects

When Defer to Production is enabled, it applies across the IDE:

* **[Data Explorer](/products/code-ide/run-and-preview/data-explorer)**: both **Preview Data** and **Compiled SQL** use the deferred production state.
* **[Terminal](/products/code-ide/run-and-preview/terminal)** dbt™ commands automatically defer to the selected production manifest.

<Info>
  **Prerequisites**

  Defer to Production needs a connected [Scheduler Environment](/products/settings/connections/scheduler-environment/index) and an existing [Bolt schedule](/products/bolt/index) with [Defer to a previous run](/products/bolt/creating-schedules/schedule-settings#defer-to-a-previous-run) enabled.
</Info>

## How `--defer` resolves `ref()` calls

When you defer, dbt™ resolves each `ref()` based on two questions:

1. Is the referenced node included in the current run's model selection?
2. Does the referenced node exist as a database object in your development environment?

If the answer to both is **no**, dbt™ resolves the `ref()` using the namespace from the production schedule's state manifest, so you read from production tables instead of building them in development. Paradime always fetches the latest `manifest.json` for the schedule you selected, so you defer against the most current production state.

### Using `--favor-state`

Choose **Defer to Production --favor-state** if you always want to read from the production manifest, even when the model already exists in your development environment. This maximizes consistency with production while you develop.

### Deferred vs standard run

The compiled SQL for the same model shows the difference. With defer enabled, `ref()` resolves to the production schema (`dbt_prod`):

```sql theme={"system"}
with orders as (
    select * from `dbt-demo-project.dbt_prod.stg_orders`
)
```

Without defer, it resolves to your development schema (`dbt_fabio`):

```sql theme={"system"}
with orders as (
    select * from `dbt-demo-project.dbt_fabio.stg_orders`
)
```

This lets you build only the models you are actively developing while referencing stable upstream models from production.

## Viewing the deferred schedule

After running a dbt™ command with defer enabled, the [Terminal](/products/code-ide/run-and-preview/terminal) output includes the deferred schedule's details, with a clickable URL that opens the production run in the [Bolt UI](/products/bolt/index).

<Info>
  Read about dbt™'s [state comparison caveats and limitations](https://docs.getdbt.com/reference/node-selection/state-comparison-caveats).
</Info>


## Related topics

- [Using Defer to Production in Paradime](/guides/paradime-fundamentals/dbt-tm-defer-to-production.md)
- [Data Explorer](/products/code-ide/run-and-preview/data-explorer.md)
- [Paradime fundamentals](/guides/paradime-fundamentals/index.md)
- [Translating Key Terms](/guides/migrations/dbt-cloud-tm-importer/translation-of-key-terms.md)
- [Bolt CI/CD for dbt™ pull requests and deploys](/products/bolt/ci-cd/index.md)
