Finch Docs
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Params

There are three types of parameters: user-defined, built-in, and environment variable.

User-defined

User-defined parameters are defined in _all.yaml, and stage files, and by --param on the command line.

params:
  foo: "bar"
  rows: "100k"
  • “$params.foo” → “bar”
  • “$params.rows” → “100000”

The “$params.” prefix is required. It can be wrapped in curly braces: “${params.foo}”.

Built-in

ParamValue
$sys.CPU_CORESNumber of CPU cores detected by Go

Built-in parameters are used as shown in the table above (no “$params.” prefix).

Environment Variable

If a parameter isn’t user-defined or built-in, Finch tries to fetch it as an environment variable. For example, if HOME=/home/finch, then “$HOME” → “/home/finch”.

Inheritance

_all.yaml

params:
  foo: "bar"
  rows: "100k"

+ Stage File

stage:
  params:
    rows: "500"
    clients: 16

= Final Params

foo = bar
rows = 500
clients = 16

--param on the command line overrides all and sets the final value.

Reusing the example above, --params rows=999 overrides both _all.yaml and the stage file, setting final value rows = 999.

Look for “param:” in the --debug output to debug parameters processing.