Run your dbt projects
You can run your dbt projects locally or using the dbt platform with the dbt framework.
Common commands
In dbt, the commands you commonly use are:
- dbt run — Run the models you defined in your project
- dbt build — Build and test your selected resources such as models, seeds, snapshots, and tests
- dbt test — Execute the tests you defined for your project
For all dbt commands and their arguments (flags), see the dbt command reference. To list all dbt commands from the command line, run dbt --help. To list a specific command's arguments, run dbt COMMAND_NAME --help.
Where to run dbt
Use the dbt framework to quickly and collaboratively transform data and deploy analytics code following software engineering best practices like version control, modularity, portability, CI/CD, and documentation. This means anyone on the data team familiar with SQL can safely contribute to production-grade data pipelines.
The dbt framework is composed of a language and an engine:
-
The dbt language is the code you write in your dbt project — SQL select statements, Jinja templating, YAML configs, tests, and more. It's the standard for the data industry and the foundation of the dbt framework.
-
The dbt engine compiles your project, executes your transformation graph, and produces metadata. dbt supports two engines which you can use depending on your needs:
- The dbt Core engine, which renders Jinja and runs your models.
- The dbt Fusion engine, which goes beyond Jinja rendering to statically analyze your SQL — validating syntax and logic before your SQL is sent to the database (saving compute resources), and supports LSP features.
dbt platform
The dbt platform is a fully managed service that gives you a complete environment to build, test, deploy, and collaborate on dbt projects. You can develop in the browser or locally using the dbt Fusion engine or dbt Core engine.
- Develop in your browser using the Studio IDE
- Seamless drag-and-drop development with Canvas
- Run dbt commands from your local command line using dbt VS Code extension or dbt CLI (both which integrate seamlessly with the dbt platform project(s)).
For more details, see About dbt plans.
dbt local development
You can run dbt locally with the dbt Fusion engine or the dbt Core engine:
- Install the dbt VS Code extension — Combines dbt Fusion engine performance with visual features like autocomplete, inline errors, and lineage. Includes LSP features and suitable for users with dbt platform projects or running dbt locally without a dbt platform project. Recommended for local development.
- Install the Fusion CLI — dbt Fusion engine from the command line, but doesn't include LSP features.
- Install the dbt CLI — The dbt platform CLI, which allows you to run dbt commands against your dbt platform development environment from your local command line. Requires a dbt platform project.
- Install dbt Core — The open-source, Python-based CLI that uses the dbt Core engine. Doesn't include LSP features.
Related docs
- About the dbt VS Code extension
- dbt features
- Model selection syntax
- dbt CLI
- Studio IDE features
- Does dbt offer extract and load functionality?
- Why does dbt compile need a data platform connection
Was this page helpful?
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.