This repository has a basic template to get started with Docker and DBT (data build tool).
- Make sure that you have docker installed and running;
- Start the services with
docker compose up --build; - Attach to the container running dbt with
docker attach docker-dbt-starter-template-app-1 - Move into the dbt directory with
cd data_warehouse_dbt/ - Run
dbt runto build the example models
You are now ready to start using DBT, as you've completed the basic setup and flow. You should be able to continue running your DBT commands.
- Detach: You can detach with
ctrl+p ctrl+qwhich will leave the container running. - Exit: You can exit with
ctrl+cwhich will stop the container. - DBT Build: Build (run and test) the models with
dbt build. - DBT Run: Build the models with
dbt run. - DBT Docs: Generate the docs with
dbt docs generatefirst, and thendbt docs serve --host 0.0.0.0.
Note: If you modify the docker-composse.yml file, you need to update the dbt_project.yml
file to still connect to the database.