# Setting Up a dbt™ Project

In this guide, you'll learn how to set up your development environment, initialize a dbt™ project, generate sources, and manage version control in Paradime. By the end of this tutorial, you'll have a fully functional dbt™ project ready for development.

**Estimated completion time:** 10 minutes

{% hint style="warning" %}

### Prerequisites

* [Paradime developer or admin permissions](https://docs.paradime.io/app-help/documentation/settings/users/roles-and-permissions)
* [Access to a Git repository](https://docs.paradime.io/app-help/documentation/settings/git-repositories) (existing or new)
  {% endhint %}

### What you'll learn

In this guide, you'll learn how to:

1. [Connect your Git Repository](#id-1.-connect-your-git-repository)
2. [Initialize your dbt™ project](#id-2.-initialize-your-dbt-tm-project)
3. [Generate sources](#id-3.-generate-sources)
4. [Manage version control](#id-4.-version-control)

***

### 1. Connect your Git Repository

Before initializing your dbt™ project, ensure you have a Git repository connected to Paradime.

* **Existing dbt™ Repository**: If you have an existing dbt project in a git repository, make sure it's connected and proceed to the next section.
* **New Repository**: If you're starting from scratch, you'll create a new repository in the next step.

***

### 2. Initialize Your dbt™ Project

{% embed url="<https://youtu.be/GxDvYNw718w>" %}

To set up your dbt™ project, use the Paradime CLI (Terminal) by running the following command:

```
paradime repo init
```

This command will:

1. Create a branch called `initialize-dbt-project`.
2. Prompt you to name your dbt™ project (e.g., `demo_project`).
3. Set up a dbt project skeleton with all necessary folders and files, including `dbt_project.yml`.
4. Prompt you to generate `sources.yml` files.

{% hint style="info" %}
If you choose not to generate sources at this stage, you can do so later using DinoAI. See [DinoAI](https://docs.paradime.io/app-help/documentation/dino-ai) use case [*Creating Sources from your Warehouse*](https://docs.paradime.io/app-help/documentation/dino-ai/agent-mode/use-cases/creating-sources-from-your-warehouse) for step by step instructions.&#x20;
{% endhint %}

***

### 3. Generate Sources

{% embed url="<https://youtu.be/42PtdhVpHyk>" %}

Generating `sources.yml` files is a crucial step in setting up your dbt™ project. These files define how dbt™ interacts with your data sources and ensure clear documentation, consistent data lineage, and robust error handling.

When prompted, Paradime will automatically fetch the available databases and schemas from your connected data warehouse. Complete the following steps:

1. **Select a database:** Navigate through the list using arrow keys. Highlight your source data database (e.g., `NBA`) and press `Enter`.
2. **Select one or more schemas:** In the schema list, use arrow keys to navigate. Press `>` to select one or more schemas containing your source tables (e.g., `Public`). Press `Enter` to confirm.

Once selected, Paradime will generate a `sources.yml` file in your project using the naming convention `sources_<schema_name>.yml`. You can rename these files to match your preferred naming convention.

***

### 4. Version Control

{% embed url="<https://youtu.be/8C0K7uTf79I>" %}

After making significant changes to your dbt™ project, it's important to keep your work synchronized with your main Git branch. Using Paradime's Git Lite feature, execute the following:

1. **Write Your Commit Message:** Use DinoAI's "Write Commit" feature to automatically generate a detailed commit message based on your specific code changes.
2. **Commit and Push:** Save your changes to your local repository, then push them to the remote repository to ensure your work is backed up and accessible.
3. **Open a Pull Request (PR):** Create a PR to allow your team to review and discuss the updates before merging.
4. **Merge the Pull Request:** Once the PR has been reviewed and approved, merge it into the main branch to finalize your changes.

***

{% hint style="info" %}

### Related Documentation

* [Importing a repository](https://docs.paradime.io/app-help/documentation/settings/git-repositories/importing-a-repository)
* [Paradime CLI](https://docs.paradime.io/app-help/documentation/code-ide/terminal/paradime-cli)
* [Git Lite in Paradime](https://docs.paradime.io/app-help/documentation/code-ide/left-panel/git-lite)
* [DinoAI - Creating Sources from your Warehouse](https://docs.paradime.io/app-help/documentation/dino-ai/agent-mode/use-cases/creating-sources-from-your-warehouse)
  {% endhint %}

***

### Summary

You've successfully set up your dbt™ project in Paradime, including initializing the project, generating sources, and managing version control. Your project is now ready for development.

Next, we'll dive into [Creating a dbt™ Model](https://docs.paradime.io/app-help/guides/paradime-101/getting-started-with-the-paradime-ide/creating-a-dbt-model) to start building your data transformations.
