dbt project project structure

dbt project project structure

Explorer

  • .devcontainernew
  • devcontainer.jsonnew
  • .vscode
  • extensions.json
  • settings.jsonnew
  • analysesnew
  • revenue_by_location.sqlnew
  • dbt_packages…, not committed
  • logs…, not committed
  • macros
  • cents_to_dollars.sql
  • _macros.ymlnew
  • limit_rows_in_dev.sqlnew
  • models
  • overview.mdnew
  • seeds
  • raw_orders.csv
  • raw_customers.csv
  • raw_items.csv
  • raw_products.csv
  • raw_stores.csv
  • raw_supplies.csv
  • payment_methods.csvnew
  • _seeds.ymlnew
  • skillsnew
  • snapshotsnew
  • customers_snapshot.ymlnew
  • target…, not committed
  • testsnew
  • assert_order_total_is_never_negative.sqlnew
  • .editorconfig
  • .envnew, not committed
  • .env.examplenew
  • .gitignore
  • .pre-commit-config.yamlnew
  • .sqlfluffnew
  • .sqlfluffignorenew
  • AGENTS.mdnew
  • CLAUDE.mdnew
  • dbt_project.yml
  • Makefilenew
  • package-lock.yml
  • packages.yml
  • profiles.ymlnew
  • README.md
  • requirements.txtnew
  • shop.duckdb, not committed
  1. # Install dbt v2 (a self-contained binary, also on Homebrew and winget)

    python -m pip install dbt
  2. # Create the project from the jaffle-shop sample

    dbt init --project-name shop --skip-profile-setup
  3. # Install packages listed in packages.yml

    cd shop && dbt deps
  4. # Load seeds, build models, run snapshots and tests in DAG order

    dbt build
  5. # Lint the SQL with the built-in, SQLFluff-compatible linter

    dbt lint
  6. # Build only what changed and everything downstream of it

    dbt build --select state:modified+ --state path/to/prod-artifacts
  7. # Generate and preview the docs site

    dbt docs generate && dbt docs serve