Step 5
Beginner
7 min

Commands

Learn the key Bruin CLI commands - run, validate, and how to configure runs with flags for dates, environments, full refresh, and variable overrides.

Bruin CLI
Learning paths:Data Engineer

Video

What is a run?

A run is a single execution of your pipeline. It can include all assets, a single asset, or a subset (e.g., one asset plus its downstream dependencies).

bruin run

The most basic invocation runs the entire pipeline with default settings:

bruin run pipeline.yml

Common flags

FlagPurpose
--start-dateSet the run start date
--end-dateSet the run end date
--full-refreshDrop and recreate tables instead of incremental insert
--environment / -eChoose which environment to use (e.g., dev, prod)
--varOverride custom variables at runtime
--downstreamAlso run all downstream assets

Example with flags

bruin run \
  --start-date 2024-01-01 \
  --end-date 2024-02-01 \
  --full-refresh \
  --var taxi_types='["yellow","green"]' \
  -e default \
  path/to/pipeline.yml

Full refresh

Without --full-refresh, an append-materialized asset will only insert new rows. With it, Bruin drops the table and recreates it from the query results. This is useful for resetting tables or first-time runs.

Running from the VS Code extension

The Bruin panel lets you configure all the same options visually - set dates, toggle full refresh, add variable overrides, and choose to run a single asset, an asset with downstream, or the full pipeline.

bruin validate

Validates your pipeline before running:

bruin validate path/to/pipeline.yml

This checks:

  • Asset definitions and types are correct
  • Dependencies exist and there are no circular references
  • SQL syntax is valid (dry-run on BigQuery and Snowflake)
  • Connections and environment configuration are correct

Always validate before deploying to catch issues early.

Key points

  • bruin run executes your pipeline with configurable dates, environments, and variable overrides
  • --full-refresh recreates tables from scratch instead of appending
  • bruin validate catches configuration, syntax, and dependency errors before runtime
  • Both commands work from the CLI and the VS Code extension panel