What is dbt? dbt, short for data build tool, is an open framework for transforming data inside a warehouse using SQL and software engineering practices. Analysts and engineers write select statements, called models, and dbt compiles them, runs them in dependency order, tests the results and generates documentation. It handles the T in ELT, working on data that has already been loaded into a platform such as Snowflake, BigQuery or Databricks. This guide explains what dbt does, how a project is organised, how to install it and run your first models, how it fits into a modern data stack, how to adopt it in a team and the mistakes that make projects hard to maintain. Details vary by version and adapter, so confirm in current dbt documentation.
Short answer: dbt turns SQL select statements into tested, documented, version-controlled tables and views in your warehouse. Start with a small project, connect a warehouse, build staging and mart models, add tests and run it through a scheduled pipeline.
What dbt does and does not do
dbt does transformation only. It does not extract data from source systems or load it, and it does not store data itself. It sends SQL to your warehouse, which does the work. This keeps it simple and lets it scale with the platform. See ETL pipelines, ETL and data engineering.

Core concepts
| Concept | Meaning |
|---|---|
| Model | A SQL select statement saved as a file, built as a table or view |
| Source | A declared raw table that models read from |
| Seed | A small CSV file loaded as a table |
| Test | An assertion about data, such as unique or not null |
| Snapshot | A record of how a table changes over time |
| Macro | Reusable Jinja code that generates SQL |
| Materialization | How a model is built: view, table, incremental or ephemeral |
| Project | The folder of models, tests and configuration managed in Git |
Together these let teams build a dependency graph of transformations that runs in the right order.
Where dbt fits in the data stack
| Layer | Typical tools | dbt role |
|---|---|---|
| Ingestion | Connectors and pipelines | Not covered, dbt reads the loaded tables |
| Storage and compute | Cloud warehouse or lakehouse | Runs the SQL |
| Transformation | dbt | Main role |
| Orchestration | Scheduler or dbt platform | Triggers runs |
| BI and activation | Dashboards and reverse ETL | Consume dbt models |
See data warehouses, Snowflake and data pipelines.

Your first dbt project
- Install dbt and an adapter. Install the core package and the adapter for your warehouse.
- Configure the connection. Create a profile with credentials, kept outside Git.
- Initialise the project. Run the init command to create the folder structure.
- Declare sources. Describe the raw tables you will read.
- Write staging models. Clean and rename source columns in simple select statements.
- Build and test. Run the build command, which executes models and tests in order.
A recommended layering
- Staging models clean and rename one source table each, with light casting and no joins.
- Intermediate models combine and reshape staging models for reuse.
- Mart models are business-facing tables, such as customers or revenue, ready for BI.
- Keep naming consistent, such as stg_, int_ and dim_ or fct_ prefixes.
- Reference other models with the ref function so dbt can build the dependency graph.
- Keep business logic in marts, not in dashboards.
Why teams adopt dbt
dbt brings software practices to analytics. SQL lives in Git with code review, tests catch bad data before it reaches reports, documentation is generated from the code and lineage shows how tables depend on each other. Analysts can contribute directly without waiting for engineers, while the platform team keeps quality controls in place. See data lineage and data quality.
How dbt runs: environments and commands
dbt uses targets to separate environments. In development each person builds into a personal schema, so experiments never touch production. In production a scheduled job builds into the shared schemas that dashboards read. The main commands are run to build models, test to execute tests and build to do both in dependency order, with selectors that let you run a single model or everything downstream of it.
Continuous integration should build only the models changed in a pull request and their children into a temporary schema, run their tests and report the result. This gives fast feedback and protects production data quality without rebuilding the whole project for every small change.
- Use separate targets for dev, CI and production.
- Select models by name, tag or state.
- Build changed models in a temporary schema for each pull request.
- Tear down temporary schemas automatically.
Documentation and lineage
Each model and column can carry a description written in YAML next to the code. dbt turns these into a browsable documentation site with a lineage graph, so anyone can see where a number comes from and which reports depend on a table. Keeping documentation beside the SQL means it is updated in the same pull request as the logic.
Common mistakes
- Putting complex joins in staging models.
- Skipping tests because the project is small.
- Building everything as tables, which wastes compute.
- No naming or layering standard.
- Running everything in production without a development target.
- Committing credentials into the repository.
A worked example
A small analytics team loaded orders, customers and payments into a warehouse. They declared the sources, wrote one staging model per table, built a customer mart and added not-null and unique tests on keys. A scheduled job ran the build each morning.
Within weeks, dashboards used the shared mart instead of ad hoc queries, test failures were caught before reports updated and new analysts understood the logic from generated documentation. The example is illustrative.
Best practices and support
- Use a separate development schema for each person.
- Run tests in continuous integration for every pull request.
- Document models and columns as you build them.
- Review cost and run times regularly.
Our data analytics service and data warehousing service help teams adopt dbt and design reliable transformation layers.
Related guides
Read dbt models, dbt tests, project structure and data modeling for related topics.
Getting started checklist
| Item | Done when |
|---|---|
| Warehouse | Access and a dev schema ready |
| Project | Initialised and in Git |
| Sources | Declared with freshness checks |
| Models | Staging and first mart built |
| Tests | Keys tested |
| Schedule | Daily build running |
Choosing between dbt Core and a hosted platform
dbt Core is free and open and runs wherever you can run Python, while hosted platforms add scheduling, a development environment, documentation hosting and access control. Small teams often start with Core and a simple scheduler, then move to a hosted option as the number of users and jobs grows. Decide based on team skills, security needs and the effort you want to spend on operations. See dbt Cloud vs Core.
Skills and team roles
A dbt team usually includes analytics engineers who own models and tests, data engineers who manage ingestion and the platform, and analysts who consume and sometimes contribute. Agree who reviews pull requests, who owns each mart and how new models are requested. Clear ownership keeps the project clean as it grows.
- Analytics engineers own models.
- Data engineers own platform and ingestion.
- Analysts contribute with review.
- Every mart has a named owner.
Key takeaways
- dbt handles transformation inside the warehouse.
- Models are SQL select statements.
- Use staging, intermediate and mart layers.
- Tests and docs come with the code.
- Start small and automate runs.
Quick glossary
| Term | Meaning |
|---|---|
| dbt | Data build tool for SQL transformation |
| Model | SQL select saved as a file |
| Source | Declared raw table |
| Materialization | How a model is built |
| Analytics engineering | Software practice applied to analytics |
Read next: BigQuery vs Snowflake: Which Cloud Data Platform? · BigQuery Streaming Inserts: Real-Time Ingestion Guide · BigQuery Access Control: IAM, Policy Tags and Row Security
Frequently asked questions
What is dbt?
A framework that transforms data inside a warehouse using SQL models, tests and documentation.
Does dbt extract or load data?
No. It handles transformation only, on data already loaded into the warehouse.
What language does dbt use?
SQL, with Jinja templating for reusable logic and macros.
Is dbt free?
dbt Core is open source, and there are paid hosted platforms with extra features.
What is a dbt model?
A SQL select statement saved as a file and built as a table or view.
How does dbt know the run order?
Models reference each other with the ref function, which builds a dependency graph.
Which warehouses does dbt support?
Many, including Snowflake, BigQuery, Databricks and Redshift, through adapters.
How do I start learning dbt?
Build a small project on a sample warehouse with sources, staging models, a mart and basic tests.
