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

What you'll learn

In this guide, you'll learn how to:


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

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.

If you choose not to generate sources at this stage, you can do so later using the command:

paradime sources generate


3. Generate Sources

Generating sources.yml ffiles 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

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.



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 to start building your data transformations.

Last updated

#350: Bolt - Template fixes pt 1

Change request updated