Skip to main content

Run Command

Executes the pipeline. This includes:

  1. Ingestion: Running dlt loaders.
  2. Transformation: Running dbt models.
  3. Blue/Green Swap: Promoting the new state to production.

Basic Usage

# Run a single asset
msh run orders

# Run asset with upstreams
msh run +orders

# Run asset with downstreams
msh run orders+

Options

--env <name>

Specify the target environment (defaults to dev).

# Development environment (Git-aware schemas)
msh run --env dev

# Production environment (Fixed schemas)
msh run --env prod

Environment Behavior:

  • dev (default): Uses Git-aware schemas. Each git branch gets isolated schemas (e.g., main_feature_new_api)
  • prod: Uses fixed schemas without git suffixes (e.g., main, msh_raw)

See Git-Aware Schemas for more details.

--debug

Enable debug mode to see raw dbt logs. Useful for troubleshooting compilation errors.

msh run --debug

This shows verbose logging from dbt, including SQL compilation details and execution logs.

--dry-run

Preview what would happen without actually executing.

msh run --dry-run

This runs the plan and shows the full execution graph, but does not load any data or swap schemas.

--all

Run all assets in your project.

msh run --all
warning

Cannot be combined with asset selectors (+asset, asset+).

Example Output

msh Run v1.0.0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

[1/4] Initializing Green Schema (analytics_green_a3f2b1c)
[OK] Schema created

[2/4] Ingestion (dlt)
[OK] stripe.customers → raw_stripe_customers (1,245 rows)
[OK] stripe.invoices → raw_stripe_invoices (3,891 rows)

[3/4] Transformation (dbt)
[OK] models/customers.msh → customers (1,245 rows)
[OK] models/revenue.msh → revenue (89 rows)

[4/4] Blue/Green Deploy
[OK] Swapping analytics_blue ↔ analytics_green_a3f2b1c
[OK] Deployment complete

State saved to msh_state_history (run_id: a3f2b1c)