Skip to main content
The compile command renders model SQL into ./target/compile/. It can also run runtime models to generate CSV outputs when requested.

Usage

sqrl compile [options]

Options

In addition to the global options, this command supports the following options:
OptionDescription
-y, --yesDisable prompts and assume defaults for unspecified settings
-c, --clearClear the target/compile/ folder before compiling
--buildtime-onlyCompile only buildtime models (mutually exclusive with --runtime-only)
--runtime-onlyCompile only runtime models (mutually exclusive with --buildtime-only)
-t TEST_SET, --test-set TEST_SETSelection test set to use (runtime models only)
-T, --all-test-setsCompile for all selection test sets (runtime models only)
-s MODEL_NAME, --select MODEL_NAMECompile a single model instead of all models
-r, --runqueryRun runtime models and write CSV outputs (not applicable to buildtime models)

Examples

Compile all models with prompts:
sqrl compile
Compile non-interactively and clear previous outputs:
sqrl compile -y --clear
Compile only runtime models for the default test set:
sqrl compile --runtime-only --test-set default
Compile runtime models for all test sets:
sqrl compile --runtime-only --all-test-sets
Compile a single model:
sqrl compile --select build_example
Run runtime models and write CSV outputs:
sqrl compile --runtime-only --runquery

Notes

  • If --yes is not provided, the command may prompt for settings interactively
  • --runquery, --test-set, and --all-test-sets apply only to runtime models
  • --buildtime-only and --runtime-only are mutually exclusive