Skip to content

Recipe Variables

Automation uses variables of various types, scopes, classes, and override priorities to help you parameterize your processes.

With recipe variables, you can make small adjustments to recipe variations to run the variations differently without having to rebuild them.

Recipe files are processed and loaded on demand, using a template engine based on Jinja. The template engine functions as a preprocessor for the recipe, compiling Jinja templates and available variables in each recipe file before it is processed during order run execution.

Tip

DataOps best practice: with variables, you can use your data in a more agile way. The parameterization of data pipelines allows for flexible execution and deployment. See Parameterize Your Processing for more best practices.

Variable classes

In Automation, variables are separated into distinct classes. A variable's class is determined by where and when it's defined.

The system loads and processes each variable class differently, and follows a strict hierarchy for overriding variable values based on class. See File Evaluation Sequence for more information on recipe processing.

Variable class Definition and details
Recipe-Level Base Variables Pre-defined variable set in a recipe's variables.json file. Saved into version control.
Variation-Level Overrides One or more pre-defined variable override sets that can be shared among variations in a recipe's variations.json file.

Saved into version control.
Kitchen-Level Overrides Pre-defined variable override set for a kitchen that is configured in the Configure Kitchen > Overrides tab in the UI or by the kitchen-config command.

These variables are outside of recipe version control. They are used to define the virtual kitchen workspace and are most often associated with infrastructure and tooling.
Order Submission Overrides Values are defined when submitting an order run in the Run Variation dialog of the UI or by the order-run command.

Constraints for order overrides (for example, setting values as required and selecting the data types) are defined in the UI prior to order submission from the Variables tab of the Variation page.
Runtime Variables Defined and re-defined as the system encounters them during the processing of a recipe variation.

Runtime variables fall into one of two subclasses: built-in or custom.
System Variables Read-only variables that cannot be overridden.

Variable set hierarchy

Recipe variables can be implemented as variable sets at different levels of the software. Override behavior follows a strict hierarchy that relates to the variable level and class.

For more information, see Variables Hierarchy.

Define variables

Variable definition depends on the variable class. Consult the docs in the table above for how to declare variables at each level.