Learn Everything

Paths/Data Engineer/Data Transformations / Models & Projects

Guided Taskbeginnerubuntu:24.04Ask AI

Lay Out the Project

The project file decides where the models live and which profile they run with. Write it.

Validator

⏱ 0:00

IDLE — checks run live as you type commands; submit when done

01Requirements

live checks
  • Directory ~/dbt exists○
  • File ~/dbt/dbt_project.yml exists○
  • The config names the project, the profile and the model paths○
  • The config states the materialisation strategy○

02Walkthrough

4 steps
  1. 01

    Create the dbt directory

    The project root holds the configuration and the models.

    mkdir -p ~/dbt
  2. 02

    Write the project config

    name identifies the project, profile names the connection, and model-paths says where the SQL lives.

    echo 'name: acme_orders\nversion: 1.0.0\nconfig-version: 2\nprofile: warehouse_dev\nmodel-paths: ["models"]\nseed-paths: ["seeds"]\ntest-paths: ["tests"]' > ~/dbt/dbt_project.yml
  3. 03

    State the materialisation strategy

    Staging models are views, because they are cheap and always read from the source. The marts are tables, because everything downstream reads them.

    echo '\nmodels:\n acme_orders:\n materialized: table\n staging:\n materialized: view' >> ~/dbt/dbt_project.yml
  4. 04

    Verify and submit

    cat the config, then submit for validation.

    cat ~/dbt/dbt_project.yml

03Stuck?

0 of 3 revealed

Take a hint without losing the lab — each one points at the thing to look at, not at the answer.

04AI Tutor

guides, never solves

Tell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?

04Notebook

saved locally in this browser

learner@lab — ubuntu:24.04

↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list