What Is dbt?
dbt (data build tool) is an open-source command-line tool that lets you transform data inside your warehouse by writing SQL SELECT statements instead of hand-rolled ETL scripts. Rather than extracting or loading data, dbt takes data that is already sitting in a warehouse like Snowflake, BigQuery, or Redshift and turns raw tables into clean, tested, documented models purely through SQL, compiled and executed as CREATE TABLE or CREATE VIEW statements against that warehouse.
Cricket analogy: Just as a scorer doesn't bowl or field but transforms raw ball-by-ball events into a readable scorecard, dbt doesn't move data into the warehouse — it transforms what MS Dhoni's team already scored into a structured, reusable record.
Why dbt Exists
Before dbt, the transformation logic that converts raw source tables into business-ready models often lived in a tangle of stored procedures, scheduled Python scripts, or opaque BI tool calculations, with no version control, no tests, and no shared documentation. dbt applies standard software engineering practices — version control with git, code review, automated testing, and modular reuse — to the analytics engineering workflow, so a SQL transformation is written once as a model, referenced by other models, and validated automatically before it reaches a dashboard.
Cricket analogy: Before DRS (Decision Review System), umpiring calls were made once with no way to check or replay them; dbt is the DRS of data transformation, letting teams review and validate every model before it counts.
dbt Core vs dbt Cloud
dbt ships in two flavors: dbt Core is the free, open-source command-line tool you install with pip and run yourself, while dbt Cloud is a managed service built by dbt Labs that adds a browser-based IDE, a job scheduler, hosted documentation, and native git integration on top of the same underlying engine. Both compile the same Jinja-templated SQL into warehouse-native SQL and execute the same DAG of models; the choice is mainly about who manages the orchestration and infrastructure, not a difference in the transformation logic itself.
Cricket analogy: Choosing dbt Core versus dbt Cloud is like choosing to maintain your own nets and bowling machine at home versus joining an academy like the MRF Pace Foundation that provides the coaching infrastructure around the same fundamental training.
# A typical dbt Core workflow from the command line
dbt run # builds all models by executing compiled SQL against the warehouse
dbt test # runs schema and data tests defined on your models
dbt docs generate # builds a documentation site describing models, columns, and lineage
dbt docs serve # serves that documentation site locallydbt never extracts data from source systems and never loads it into the warehouse — that is the job of ingestion tools like Fivetran, Airbyte, or Stitch. dbt is exclusively the 'T' in ELT: it transforms data that is already present in the warehouse.
- dbt (data build tool) transforms data already loaded in a warehouse by compiling SQL SELECT statements into CREATE TABLE/VIEW statements.
- It is exclusively the 'T' in ELT — it does not extract or load data from source systems.
- dbt applies software engineering practices (version control, testing, modular reuse, documentation) to analytics SQL.
- dbt Core is the free, open-source CLI tool you run and host yourself.
- dbt Cloud is a managed service from dbt Labs adding a browser IDE, scheduler, and hosted docs on top of the same engine.
- Models are defined as .sql files containing SELECT statements referencing other models via the ref() function.
- dbt supports multiple warehouses through adapters such as dbt-snowflake, dbt-bigquery, and dbt-redshift.
Practice what you learned
1. Which part of the ELT pipeline does dbt handle?
2. What does dbt compile a model's SQL into before running it?
3. What is the main difference between dbt Core and dbt Cloud?
4. Which of the following is NOT something dbt does?
Was this page helpful?
You May Also Like
Installing dbt and Project Setup
How to install dbt Core with the correct database adapter, scaffold a new project with dbt init, and understand the role of profiles.yml.
The dbt Project Structure
A tour of a dbt project's folders and configuration files, and the staging/intermediate/marts convention used to organize models.
Your First dbt Model
How to write, materialize, and run a basic dbt model, including the ref() function and how dbt builds its dependency DAG.
Related Reading
Related Study Notes in Programming
Browse all study notesApache Spark Study Notes
Programming · 30 topics
ProgrammingApache Flink Study Notes
Programming · 30 topics
ProgrammingHadoop Study Notes
Programming · 30 topics
ProgrammingSnowflake Study Notes
Programming · 30 topics
ProgrammingApache Airflow Study Notes
Programming · 30 topics
ProgrammingPowerShell Study Notes
Programming · 30 topics