Override SQL file location with a local directory. Data paths still come from the provisioned environment. Use this for iterative debugging of setup/queries/cleanup scripts without reprovisioning.
--local <DIR>
## Overview `--local <DIR>` tells `demo-test` to read phase SQL files from a directory on disk instead of using the copies returned by the provision API. This is the iteration loop for demo authors: provision once, then re-run with `--local` after each edit to see the effect of your SQL change without redownloading data or resetting the zone. ## Behavior - The override is per-file. After the provision API returns, the harness looks in `<DIR>` for `setup.sql`, `queries.sql`, and `cleanup.sql`. Each file it finds replaces the corresponding provision response field. Files that are missing from `<DIR>` fall back to the provisioned version. - The override affects only SQL file content. The provisioned `data_path` (and therefore the `{{data_path}}` substitution) continues to come from the control plane. - The directory must exist and be a directory. `<DIR>` not existing, or existing as a regular file, is a fatal error before any phase runs. - `--local` composes with `--phase`. You can, for example, re-run only queries from a local file while leaving the provisioned setup.sql unused. - `--local` does not disable provisioning. Every invocation still calls the control plane to authenticate, resolve the compute node, download demo data (idempotent against `TARGET_DIR`), and populate the three variables. ## Compatibility - `--local` is available on every `demo-test` invocation; it has no interaction with profiles, `--node`, or output format flags. - The file names (`setup.sql`, `queries.sql`, `cleanup.sql`) are hard-coded. Other names in the directory are ignored.
| Name | Type | Description |
|---|---|---|
--local | Local directory containing `setup.sql`, `queries.sql`, and/or `cleanup.sql`. Any file that exists in the directory replaces the corresponding file from the provision response; missing files fall back to the provisioned version. |
# Edit queries.sql in-tree, rerun against already-provisioned data
delta-forge-cli demo-test prod-node landing demos/csv/sales-quickstart --phase queries --local ./demos/csv/sales-quickstart
# Override all three phase SQL files from a scratch directory
delta-forge-cli demo-test prod-node landing demos/csv/sales-quickstart /tmp/df-demos --local ./scratch/sales-fix
# --local cannot be used to skip provisioning; the control plane is still called
delta-forge-cli demo-test prod-node landing demos/csv/sales-quickstart --local ./local-dir # provisions, then uses local SQL