Setting Up a dbt™ Project
Last updated
Was this helpful?
Last updated
Was this helpful?
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
In this guide, you'll learn how to:
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.
To set up your dbt™ project, use the Paradime CLI (Terminal) by running the following command:
This command will:
Create a branch called initialize-dbt-project
.
Prompt you to name your dbt™ project (e.g., demo_project
).
Set up a dbt project skeleton with all necessary folders and files, including dbt_project.yml
.
Prompt you to generate sources.yml
files.
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:
Select a database: Navigate through the list using arrow keys. Highlight your source data database (e.g., NBA
) and press Enter
.
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.
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:
Write Your Commit Message: Use DinoAI's "Write Commit" feature to automatically generate a detailed commit message based on your specific code changes.
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.
Open a Pull Request (PR): Create a PR to allow your team to review and discuss the updates before merging.
Merge the Pull Request: Once the PR has been reviewed and approved, merge it into the main branch to finalize your changes.
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 to start building your data transformations.