This is a sandbox project for exploring the basic functionality and latest features of dbt. It's based on a fictional restaurant called the Jaffle Shop that serves jaffles. Enjoy!
-
Follow the steps to create a new repository.
-
Set up a dbt Cloud account and follow Step 4 in the Quickstart instructions for your data platform, to connect your platform to dbt Cloud.
-
Choose the repo you created in Step 1 as the repository for your dbt Project code.
-
Click
Develop
in the top nav, you should be prompted to run adbt deps
, which you should do.
If you'd like to use the dbt Cloud CLI, but are a little intimidated by the terminal, we've included a task runner called, fittingly,
task
. It's a simple way to run the commands you need to get started with dbt. You can install it by following the instructions here. We'll call out thetask
based alternative to each command below.
-
Run
git clone [new repo name]
to clone your new repo to your local machine. -
Set up a virtual environment and activate it. I like to call my virtual environment
.venv
and add it to my.gitignore
file (we've already done this if you name your virtual environment '.venv') so that I don't accidentally commit it to the repository, but you can call it whatever you want.python3 -m venv .venv # create a virtual environment OR task venv # create a virtual environment source .venv/bin/activate # activate the virtual environment
-
Install the project's requirements into your virtual environment.
python3 -m pip install -r requirements.txt # install the project's requirements OR task install # install the project's requirements
-
Follow steps 2 and 3 on this page to setup dbt Cloud CLI's connection to dbt Cloud, only if you haven't already done so (we handled step 1 above and will do step 4 together next).
-
Double check that your
dbt_project.yml
is set up correctly by runningdbt list
. You should get back a list of models and tests in your project.
Once your development platform of choice is set up, use the following steps to get the project ready for whatever you'd like to do with it.
- Run
task setup
.
-
Run
dbt build
to load the sample data into your raw schema, build your models, and test your project. -
Delete the
jaffle-data
directory now that the raw data is loaded into the warehouse.
Have fun exploring dbt! ๐