This repository serves as a foundational template for initiating and managing dbt projects. It provides a structured framework, best practices, sample models, tests, and documentation to jumpstart your analytics engineering workflows.
To start, clone the repository to your local machine. Use the following command in your terminal.
git clone [repository URL]
cd [repository name]
Set up a virtual environment to manage dependencies for this project.
python -m venv venv
source venv/bin/activate
The profiles.yml
file contains configuration settings for your dbt profile, including details to connect to your DuckDB databases.
- Create a
profiles.yml
file in your~/.dbt/
directory. - Edit the file to include the connection details for your data warehouse.
dbt_blueprint:
target: dev
outputs:
dev:
type: duckdb
path: databases/raw.duckdb
alias: raw
schema: dev
threads: 1
attach:
- path: 'databases/staging.duckdb'
alias: staging
- path: 'databases/analytics.duckdb'
alias: analytics
Execute the dbt_setup.sh
script to install dbt and other dependencies and test the connection.
./dbt_setup.sh
Compile and run the dbt models along with tests.
dbt build