dbt CLI is the command-line interface for building, testing, and deploying dbt Core projects.
dbt CLI is the command-line interface that lets data engineers build, test, and deploy dbt Core projects locally or in CI pipelines using simple shell commands.
dbt CLI is the free, open-source command tool that ships with dbt Core.It compiles SQL models, executes them as dependency-aware DAGs, and writes results back to your data warehouse.
dbt CLI reads your project’s dbt_project.yml, parses Jinja SQL files in the models directory, builds a manifest, and runs tasks like run, test, seed, and docs while managing dependencies specified in packages.yml.
Common commands include dbt run for model execution, dbt test for data quality, dbt seed for static datasets, dbt docs generate/serve for documentation, and dbt build to run models, tests, and snapshots in one step.
Install with Homebrew: brew install dbt-core dbt-postgres
.For Python environments, use pipx: pipx install dbt-postgres
. Create a profiles.yml in ~/.dbt/
with warehouse credentials to let dbt connect.
brew update
brew install dbt-core dbt-bigquery # choose adapter
dbt --version
Navigate to the project root and execute dbt run --select staging+
. dbt resolves the graph, builds upstream dependencies, and writes tables/views.Use --full-refresh
for incremental tables.
Run dbt test
to execute schema and data tests defined in YAML. Generate HTML docs with dbt docs generate
and preview locally using dbt docs serve
.
Embed dbt commands in GitHub Actions, GitLab CI, or CircleCI.Typical jobs install dependencies, run dbt deps
, then dbt build --select state:modified+
to test only changed models.
Use dbt CLI for local development, unlimited environments, and full control over CI. Choose dbt Cloud when you need hosted scheduling, lineage UI, and fine-grained role management without maintaining infrastructure.
Galaxy’s desktop SQL editor speeds up authoring the SELECT statements that become dbt models.You can iterate queries with AI copilot, endorse them in Collections, then copy into your models directory for execution via dbt CLI.
Use environment variables for secrets, lock package versions with dbt deps --lock
, lint SQL with sqlfluff
, and run dbt build
in pull-request pipelines to catch issues early.
Deploy an incremental sales model by running dbt run --select fct_sales --full-refresh
on first load, then scheduling dbt run --select fct_sales
nightly to process only new partitions.
dbt CLI offers a scriptable, version-controlled workflow for SQL transformations.Mastering commands like run, test, and build lets teams ship reliable analytics faster.
.
dbt CLI underpins reproducible analytics engineering workflows. Command-line execution means every transformation is version-controlled, peer-reviewed, and CI-testable—critical for data reliability. Container-friendly commands let teams shift compute to cloud runners, shrinking local resource usage while enabling parallel builds. Open-source licensing removes vendor lock-in, giving growing startups enterprise-grade transformation tooling without subscription costs.
Use threads with dbt run --threads 8
, leverage incremental models, and run only modified models via state comparison.
Yes. Use cron, Airflow, Dagster, or GitHub Actions to trigger dbt commands on a schedule.
Author and optimize SQL in Galaxy, endorse trusted queries, then paste them into model files. Galaxy’s AI copilot ensures syntactic correctness before dbt execution.
Official adapters exist for Snowflake, BigQuery, Redshift, Postgres, Databricks, and others. Community adapters cover ClickHouse, DuckDB, Athena, and more.