Select which phase(s) to run. `all` is the default. Useful for iterative debugging: provision once, then re-run just `queries` against the provisioned data.
--phase setup|queries|cleanup|all
## Overview `--phase` chooses which of the three lifecycle phases `demo-test` executes. The default `all` runs every phase in order, which is the right mode for CI. Targeted phases are how you iterate during development: provision once with `--phase setup`, fix SQL, then re-run `--phase queries` repeatedly without reprovisioning. ## Behavior - `setup` executes `setup.sql`. Each statement is split on `;`, substituted, and run against the compute node. Errors do not halt the phase; every statement is attempted and the failures are recorded in `setup_steps[]` with `status: "ERROR"`. - `queries` parses `queries.sql` into individually-titled query blocks (separated by `-- ===...===` banners) and runs each block as a single SQL statement. Failures are recorded in `queries[]` with `status: "ERROR"`; successful queries are `status: "PASS"`. The phase continues after individual failures. - `cleanup` runs `cleanup.sql` after first filtering out `DROP SCHEMA IF EXISTS` and `DROP ZONE IF EXISTS` statements unless the corresponding `--drop-schema` / `--drop-zone` flag is set. Cleanup failures are logged but do not change the exit code. - `all` is `setup` then `queries` then `cleanup`, with no short-circuit on error. A failing setup still runs queries and cleanup. - Provisioning (authentication, compute-node resolution, control plane demo download) runs regardless of phase. Choosing `--phase cleanup` does not skip the provision step. - Exit code: 0 unless setup had at least one error or queries had any failure or error. Cleanup errors alone do not fail the run. ## Compatibility - Phase names are case-sensitive. Only the four listed values are accepted. - `--phase` is independent of `--local`; you can pair any phase with a local SQL override. - `--phase` is independent of `--drop-schema` / `--drop-zone`; those flags are consulted only when the cleanup phase actually runs.
| Name | Type | Description |
|---|---|---|
--phase | Lifecycle phase selector. Valid values: `setup`, `queries`, `cleanup`, `all`. `all` runs setup then queries then cleanup in that order. |
# Provision + run only the setup phase (create tables, load data)
delta-forge-cli demo-test node zone path --phase setup
# Re-run just queries after editing queries.sql, reading SQL from a local dir
delta-forge-cli demo-test node zone path --phase queries --local ./demo-dir
# Tear the demo down, including schema and zone
delta-forge-cli demo-test node zone path --phase cleanup --drop-schema --drop-zone
# Default: setup + queries + cleanup
delta-forge-cli demo-test node zone path --phase all