Skip to content

Define Variation Override Variables

You can define a variation override variables set from the Recipes page or by editing the variations.json file in the File Editor.

Warning

Variables follow a hierarchy. Variables defined at this level override the same variables in a recipe's base variable set.

Variable requirements

  • Variables larger than 1 MB in size are not supported.
  • Variable names must adhere to DataKitchen's naming conventions. They are case-sensitive, can include alphanumeric and underscore characters, cannot start with numbers, and cannot contain hyphens or dashes.
    • Do not use the names reserved for system variables to define custom variables, as this can create conflicts and errors in recipes.

Define variation overrides from the Recipes page

  1. Navigate to the Recipes page.
  2. Select the Variable Sets tab.
  3. Click Add Variable Set.
  4. Enter a variable set name.
  5. Click Add Variable.
  6. Enter a variable name, variable type, and value.
  7. Optional. Repeat steps 5 and 6 to add more variables to the variable set.
  8. Select Add notes for changelog , describe the changes, then click Update.

Apply a variation override set to a variation

After defining a new variation override set you can apply it to a specific variation.

  1. From the Recipes page, select the Variations tab.
  2. Click the Actions menu associated with the variation.
  3. Select Edit.
  4. In the Edit Variation dialog, choose a variable set from the Override Sets drop-down list.
  5. Select Add notes for changelog , describe the changes, then click Update.

Define variation overrides from the Variation page

  1. From the Recipes page, click a variation name shown in the Variations tab.
  2. Select the Variables tab.
  3. In the Variation Override Values column, click Add Variable Set.
  4. To use an existing variable set:
    1. Select Use existing variable set.
    2. Choose from the available variation variable sets.
    3. Click Add.
  5. To create a new variable set:
    1. Select Create new variable set.
    2. Enter a variable set name.
    3. Click Add. A new column will appear in the Variables table.
    4. In the new variable set column, click any cell associated with a variable you want to override.
    5. Enter a type and value for the variable.
    6. Optional. Repeat steps d and e for other variables.
  6. Select Add notes for changelog , describe the changes, then click Update.

Visual example in Automation

(Screenshot of the Variables list)

Define variation overrides from the File Editor

See the example variations.json file below for more guidance.

  1. Navigate to the Recipes page.
  2. Select Recipe Actions > View Files.
  3. Select variations.json from the file editor list.
  4. In the override-setting-list object, define the override set name, variable names, and values.

    Use properly formed JSON.

  5. In the variation-list object:

    1. Locate the variation you want to apply the override set to.
    2. Declare the override set name as the value for the override-setting key.
  6. Select Add notes for changelog , describe the changes, then click Update.

Example variations.json with overrides

{
    "variation-list": {
        "variation-1": {
            "graph-setting": "graph",
            "override-setting": [
                "override-set-example-name-1"
            ]
        },
        "variation-2": {
          "description": "This variation has no override set",
            "graph-setting": "graph",
            "order-override-constraints": {}
        }
    },
    "graph-setting-list": {
        "graph": [
            [
                "node1",
                "node2"
            ],
            [
                "node2",
                "node3"
            ]
        ]
    },
    "override-setting-list": {
        "override-set-example-name-1": {
            "variable_name_1": "value1"
        },
        "override-set-example-name-2": {
            "variable_name_2": "value2",
            "variable_name_3": "value3"
        }
    }
}