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

# DuckDB

> Connect DuckDB to Paradime to run dbt™ against a local or in-memory DuckDB database from the Code IDE, Bolt, and Agent environments.

[DuckDB](https://duckdb.org/) is an in-process analytical database for storing and querying your data. Connect it to Paradime to run dbt™ from the Code IDE, deploy production jobs with Bolt, and let the DinoAI background agent work against your database.

<Note>
  **Available in:** Code IDE, Bolt, and Agent environments.
</Note>

## Add a connection

1. Click **Settings** in the top menu bar of the Paradime interface to access **Workspace Settings**.
2. In the left sidebar, click **Environments**.
3. Click **Add New** next to the section for the environment you are configuring:
   * **Code IDE** for the Code IDE connection
   * **Bolt** for the Bolt connection
   * **Agent** for the Agent connection
4. Select **DuckDB** and fill out the corresponding fields.

## Configuration

In the connection setup screen, fill in the form with the details of the connection you want to use to run dbt™ models against a DuckDB database.

In this example you connect to `s3` to read and write `parquet` files using an AWS access key and secret. These secrets can be stored in the [user environment variable settings](/products/settings/environment-variables/code-ide-env-variables).

## Field details

Below are the fields and examples to create a connection.

| Field                 | Description                                                                                                                                                                                                                                                                                                                                                          | Example                | Level           |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | --------------- |
| Profile Name          | The profile name set in your `dbt_project.yaml`. See more [here](https://docs.getdbt.com/docs/core/connect-data-platform/connection-profiles).                                                                                                                                                                                                                       | `dbt-duckdb`           | Workspace level |
| Target                | The target name used to identify the connection. See more [here](https://docs.getdbt.com/reference/dbt-jinja-functions/target).                                                                                                                                                                                                                                      | `dev`                  | Workspace level |
| Profile Configuration | Define the path to the DuckDB database where dbt™ will run. Configure any supported [DuckDB extensions](https://duckdb.org/docs/extensions/overview) by listing them in the `extensions` field. Set additional [DuckDB configuration options](https://duckdb.org/docs/sql/configuration) via the `settings` field, including options supported by loaded extensions. | See the example below. | User level      |
| Schema                | The default schema used to build dbt™ objects at runtime.                                                                                                                                                                                                                                                                                                            | `dbt_john`             | User level      |
| Threads               | The number of threads used in this connection. See more [here](https://docs.getdbt.com/docs/running-a-dbt-project/using-threads).                                                                                                                                                                                                                                    | `8`                    | User level      |

Example profile configuration:

```yaml theme={"system"}
extensions:
  - httpfs
  - parquet
path: ./dbt.duckdb
settings:
  s3_access_key_id: '{{ env_var("S3_ACCESS_KEY_ID") }}'
  s3_region: '{{ env_var("S3_REGION", "us-west-1") }}'
  s3_secret_access_key: '{{ env_var("S3_SECRET_ACCESS_KEY") }}'
```

<Info>
  For additional supporting docs see the [DuckDB SQL reference](https://motherduck.com/docs/category/duckdb-sql-reference).
</Info>

## Explore data in your DuckDB database from Paradime

Paradime integrates with Harlequin out of the box, with no installation required. Check our integration guide to see how you can query data directly from the Paradime terminal.

<Card title="Harlequin" href="/integrations/harlequin" horizontal icon="arrow-right" />

## Related

<CardGroup cols={2}>
  <Card title="Optional connection attributes" href="/guides/data-warehouse-essentials/optional-connection-attributes" icon="gear" horizontal>
    Set additional `profiles.yml` attributes for this connection.
  </Card>
</CardGroup>


## Related topics

- [DinoAI Tools](/products/dino-ai/tools-and-features/index.md)
- [DuckDB Tool](/products/dino-ai/tools-and-features/warehouse-tool/duckdb-tool.md)
- [Harlequin](/integrations/harlequin.md)
- [MotherDuck](/integrations/motherduck.md)
- [Metadata](/developers/python-sdk/modules/metadata.md)
