Skip to main content

Clone the Jaffle Shop sample project

dbt
Beginner
Beginner
Menu

    What is Jaffle Shop?

    Jaffle Shop is dbt Labs' canonical sample dbt project for a fictional cafe business. This guide shows you how to clone the project using Git from GitHub or GitLab.

    Cloning downloads the dbt project files to your machine: models, seeds, tests, and configuration. It doesn't install dbt or set up a database. If you only need the project files, follow the Clone the repository and Verify the clone sections.

    To run dbt commands like dbt seed, dbt run, and dbt test, you also need dbt installed and a database to connect to. Refer to Next steps for links to warehouse quickstarts.

    Prerequisites

    • Git installed
    • A terminal
    • A GitHub or GitLab account (only if you plan to fork the repo, push changes, or clone from a private repository)

    Verify Git is installed:

    git --version

    Clone the repository

    1. Open your terminal and navigate to where you keep projects:

      cd ~/Documents/Github
    2. Clone the repository:

      git clone https://github.com/dbt-labs/jaffle-shop.git
    3. Change into the project directory:

      cd jaffle-shop

    Verify the clone

    Confirm the project files are present:

    ls

    You should see files and folders including:

    • dbt_project.yml
    • models/
    • seeds/
    • packages.yml

    Cloning is complete! 🎉 You now have the Jaffle Shop project files on your machine.

    Explore the project structure

    Before you install dbt or connect a database, take a quick look at what you cloned. Jaffle Shop is a fictional cafe business. The project contains 13 models that transform cafe data about customers, locations (stores), products, supplies, and orders.

    It also includes:

    • Seeds: Six CSV files under seeds/jaffle-data/ that provide the raw sample data.
    • Data tests and unit tests: YAML alongside the models that check uniqueness, not-null values, and a few unit-test cases.
    • Macros: Small helper macros in macros/.
    • Packages: Dependencies listed in packages.yml (install later with dbt deps).

    A simplified view of the project looks like this:

    jaffle-shop/
    ├── dbt_project.yml
    ├── packages.yml
    ├── models/
    │ ├── staging/ # Clean and rename raw tables
    │ │ ├── stg_customers.sql
    │ │ ├── stg_orders.sql
    │ │ ├── stg_order_items.sql
    │ │ ├── stg_products.sql
    │ │ ├── stg_locations.sql
    │ │ ├── stg_supplies.sql
    │ │ └── __sources.yml
    │ └── marts/ # Business-ready tables for the cafe
    │ ├── customers.sql
    │ ├── orders.sql
    │ ├── order_items.sql
    │ ├── products.sql
    │ ├── locations.sql
    │ ├── supplies.sql
    │ └── metricflow_time_spine.sql
    ├── seeds/
    │ └── jaffle-data/ # Sample CSV data (customers, orders, and more)
    ├── macros/
    ├── analyses/
    └── data-tests/

    Staging models sit closest to the raw seed data. Marts models join and shape that data into the tables you use for analysis. You don't need to read every file yet. This layout follows a standard dbt project pattern that appears in many real-world projects.

    Next steps

    To run or develop the project, you need dbt installed and a database connected. These links can help:

    Warehouse quickstarts

    To run the project, you need a database and adapter configured in profiles.yml. Choose the quickstart for your warehouse or local setup:

    You can also browse all guides or other example dbt projects.

    Optional cleanup

    If you cloned the repo only to test these steps and don't need the project anymore, you can remove the folder:

    rm -rf ~/Documents/Github/jaffle-shop

    This deletes the cloned project from your machine. It doesn't affect the GitHub or GitLab repository.

    Was this page helpful?

    This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

    0