DataLane

All stacks · Transformation

dbt

SQL transformation, testing, and analytics engineering.

dbt cover

Related reading

About dbt

dbt turned SQL transformation into software engineering: version control, tests, documentation, and environments for the layer of your platform that used to live in undocumented stored procedures. It is the closest thing analytics engineering has to a standard.

These guides focus on what separates a demo project from a production one — incremental models that survive late-arriving data, tests that catch real regressions instead of adding noise, slim CI that builds only what changed, and project structures that stay navigable past 500 models.

What you'll learn here

  • Model design: staging, intermediate, and mart layers with clear grain declarations
  • Incremental models: strategies, lookback windows, and full-refresh discipline
  • Testing: generic tests, unit tests, and where dbt tests stop being enough
  • CI/CD: state comparison, deferral, and slim CI that finishes in minutes
  • Jinja and macros without turning your project into a template labyrinth

Frequently asked questions

Is dbt an ETL tool?

No — dbt only does the T. It transforms data already loaded into your warehouse using SQL SELECT statements it materializes as tables and views. Extraction and loading belong to tools like Fivetran, Airbyte, or your own ingestion pipelines.

dbt Core or dbt Cloud?

dbt Core is the open-source CLI and works anywhere you can run Python; you bring your own scheduler and CI. dbt Cloud adds a managed scheduler, IDE, and APIs. Most teams start with Core plus GitHub Actions and revisit Cloud when scheduling and self-service become painful.

When should a model be incremental?

When rebuilding it from scratch is meaningfully slow or expensive — typically large event tables. Start with plain tables; convert to incremental when build time or cost hurts, and always define how late-arriving rows get picked up (a lookback window or merge keys).

How many tests are enough?

Every model should declare not_null and unique on its primary key, and relationships on important foreign keys. Beyond that, test business invariants that would silently corrupt downstream numbers. Hundreds of redundant tests slow CI and train people to ignore failures.

Does dbt replace Airflow?

No — they solve different problems. dbt builds the transformation DAG inside the warehouse; Airflow orchestrates across systems (ingestion, dbt runs, exports, ML). Many production stacks run dbt as one task inside an Airflow DAG.

New dbt posts, straight to your inbox

One email a week with our latest tutorials. No spam.

Newsletter signup is not live yet. Use the contact form if you want to be notified.

↑↓ navigate openesc close