- Python >= 3
- Install dbt running:
make install-dbt
- Init your dbt profile running:
make init-dbt-profile
- Run:
make postgres-up
to run a local instance of Postgres DB - If you want to stop your Postgres instance, run
make postgres-down
The first step to do, it's to run the seed command, that will import static tables to your destination db.
It's possible to create tables from static CSV files inside the data
folder simply calling:
dbt seed --show
The mostly easy command to run a model is: dbt run
, but sometimes we want to be more specific
# call a model called my_model dbt run --models my_model # call all the models inside dimensions folder dbt run --models dimensions # call all the models with the tag sample dbt run --models tag:fact # call a model with a specific target dbt run --models example --target dev
# run all the test for the default target dbt test # test specific model dbt test --models date_dim
# generate docs dbt docs generate # serve docs dbt docs serve
This repo is based on the amazing example of jaffle_shop
- Add a Makefile to init dbt, install libs, spin up Postgres locally
- Find other interesting dataset to make other examples