- git
- Python 3.9 or higher
- Docker Desktop
- Clone this repository
git clone https://github.com/snhou/jaffle-shop-dbt-demo.git
- Change into the
jaffle_shop
directory
cd jaffle-shop-dbt-demo
- Install virtual environment
python3 -m venv venv
- Enter into venv
source venv/bin/activate
- Update pip
python3 -m pip install --upgrade pip
- Install dependencies
python3 -m pip install -r requirements.txt
- Open Docker Desktop and run docker-compose.yaml
docker compose build
docker compose up -d
- Set up a
profiles.yml
calledjaffle_shop
to connect to a data warehouse
jaffle_shop:
target: dev
outputs:
dev:
type: postgres
host: localhost
user: dbt
password: dbt
port: 5432
dbname: dbt
schema: jaffle-shop-classic
threads: 4
- Ensure your profile is setup correctly from the command line:
dbt debug
- it will generate a
.user.yml
file
- Load the CSVs with the demo data set. This materializes the CSVs as tables in your target schema. Note that a typical dbt project does not require this step since dbt assumes your raw data is already in your warehouse.
dbt seed
- Run the models:
dbt run
- Test the output of the models:
dbt test
- Generate documentation for the project:
dbt docs generate
- View the documentation for the project:
dbt docs serve