ops dbt
dbt data transformation operations. All commands run against the dbt Cloud CLI (not dbt-core). The dbt project lives at ~/projects/data-warehouses/dbt_wasteology_warehouse.
This project uses dbt Cloud CLI (v0.40.14). Do NOT use dbt-core or pass --profiles-dir flags. The Cloud CLI detects the project via cwd (finds dbt_project.yml) and authenticates via ~/.dbt/dbt_cloud.yml.
Subcommandsโ
| Subcommand | Description |
|---|---|
run | Run dbt models |
test | Run dbt tests |
build | Build dbt models (run + test combined) |
compile | Compile dbt models without running |
freshness | Check source data freshness |
ls | List dbt resources |
debug | Debug dbt connection and configuration |
docs | Generate dbt documentation |
manifest | Show dbt manifest information |
Examplesโ
Common Workflowsโ
Daily Refresh
Use ops dbt build to run and test models in dependency order โ fails fast on broken tests.
Iterate on a Model
ops dbt run --select my_model+ rebuilds a model and everything downstream of it.
Source Audit
ops dbt ls --type source shows every declared source. Pair with freshness to spot stale tables.
Troubleshooting
Start with ops dbt debug when something feels off โ it verifies auth, project resolution, and connectivity.
dbt's selector syntax is powerful: +model (upstream), model+ (downstream), +model+ (both), tag:nightly, staging.* (path glob). All work with run, test, build, and compile.
The Cloud CLI prefixes stdout with timestamp logs (e.g. HH:MM:SS data). The ops dbt wrapper handles this automatically for JSON-returning commands like ls.