# Setting Up Data Warehouse Connections

In this guide, you'll learn how to set up and manage multiple data warehouse connections within your Paradime workspace. This process is crucial for configuring connections for both development in the [Paradime Code IDE](https://docs.paradime.io/app-help/documentation/code-ide) and running dbt™ in production with the [Bolt Scheduler](https://docs.paradime.io/app-help/documentation/bolt).

**Estimated completion time:** 10 minutes

{% hint style="warning" %}

### Prerequisites

* An [**admin role**](https://docs.paradime.io/app-help/documentation/settings/users/role-based-access-control) In Paradime to create workspaces
  {% endhint %}

### What you'll learn

In this guide, you'll learn how to:

1. [Add a Bolt Scheduler connection](#id-2.-add-a-bolt-scheduler-connection)
2. [Add a TurboCI connection](#id-3.-add-a-turboci-connection)
3. [Manage your connections](#id-4.-manage-your-connections)
4. [Use targets with dbt™ commands](#id-5.-using-targets-with-dbt-tm-commands)

***

### Video Tutorial

The following video provides step-by-step instructions for adding a scheduler environment (bolt scheduler) and a Turbo CI connection.&#x20;

{% embed url="<https://youtu.be/DdPo-dMbkBE>" %}

***

### 1. Add a Bolt Scheduler Connection

This connection will be used as the default target for your Bolt schedules to run dbt™ in production.

1. Navigate to your account settings
2. Locate the `Connections` tab.
3. Click `Add New` button in the Scheduler section.
4. Select your data warehouse provider (e.g., Snowflake)
5. Configure the connection details.
6. Click 'Test Connection' to verify the setup.

💡 For visual guidance, follow [video tutorial](https://youtu.be/DdPo-dMbkBE?si=dyCMB9KyP8K3BFYG\&t=32).&#x20;

***

### 2. Add a TurboCI Connection

This connection will be used specifically for running dbt™ with [TurboCI](https://docs.paradime.io/app-help/documentation/bolt/ci-cd/turbo-ci) to build and test your dbt™ models when opening a Pull Request.

1. Follow steps 1-3 from the above section, [Add a Bolt Scheduler Connection](#id-2.-add-a-bolt-scheduler-connection)
2. Configure the connection details:
   * Provide a dbt™ profile name (This should match with the profile name set in your `dbt_project.yml`).
   * Set the target as `CI`.
   * Enter your data warehouse credentials (similar to the Scheduler prod connection).
   * Change the schema name to `dbt_ci` (or your preferred CI schema).
   * Configure thread settings as needed.
3. Click `Test Connection` to verify the setup.

💡 For visual guidance, follow [video tutorial](https://youtu.be/DdPo-dMbkBE?si=D8M0ljlb8Py99ORh\&t=102).

***

### 3. Manage Your Connections

After setting up your connections, you'll have:

* A `prod` target connection for orchestrating production jobs.
* A `ci` target connection for running dbt™ with [TurboCI](https://docs.paradime.io/app-help/documentation/bolt/ci-cd/turbo-ci).

These connections enable you to separate your development, testing, and scheduler environments effectively within Paradime.

***

### 4. Using Targets with dbt™ Commands

After setting up multiple connections, it's important to understand how to direct your dbt™ commands to use a specific target. This allows you to switch between multiple environments easily.

#### Default Behavior

By default, when you run a dbt™ command without specifying a target:

* In the Code IDE: It will use the default connection set for the Code IDE.
* In the Scheduler: It will use the default connection set for the Scheduler.

Example:

```bash
dbt run
```

It will use the default target for your current environment.

#### Specifying a Target

To use a specific target, append the `--target` argument to your dbt command:

```bash
dbt <command> --target <target_name>
```

For example, to run dbt using the 'CI' target we set up earlier:

```bash
dbt run --target ci
```

This command will execute the dbt run using the connection details specified in the `ci` target, regardless of the default setting.

***

{% hint style="info" %}

### Related Documentation

* [Production Environments in Paradime](https://docs.paradime.io/app-help/documentation/settings/connections/scheduler-environment)
* [CI/CD In Paradime](https://docs.paradime.io/app-help/documentation/bolt/ci-cd)
  {% endhint %}

***

### Summary

You've now set up multiple data warehouse connections, learned how to manage them, and understand how to use different targets with dbt™ commands. These skills will allow you to efficiently work across development, testing, and production environments in Paradime.

Next, we'll dive into [Managing Workspace Configurations](https://docs.paradime.io/app-help/guides/paradime-101/getting-started-with-your-paradime-workspace/managing-workspace-configurations) to further customize your Paradime environment.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paradime.io/app-help/guides/paradime-101/getting-started-with-your-paradime-workspace/setting-up-data-warehouse-connections.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
