Setting Default Parameters

Setting Default Parameters for a Workspace/Environment

To set default Parameters for an environment:

  1. Open the Build Settings Tab, the gear icon located on the bottom left of the build tab interface.
  2. Choose a Workspace/Environment and Edit it
  3. Click on Parameters - here Parameters can be set for this Workspace/Environment.
  4. Make sure to click Save to save your new parameters
Example parameters in a DEV workspace

Example parameters in a DEV workspace

Below are the same parameters from the screenshot in text format if you'd like to test them.

{
	"accepted_values": [
		"shipped",
		"delivered",
		"pending"
	],
	"my_number": 1,
	"my_string": "testing"
}

Using Parameters in Transforms

The values in Parameters can be used in transforms within Nodes using the following format - {{ parameters.my_var }}, where your parameters follow JavaScript object dot notation syntax. Below are a few examples to illustrate this.

{{parameters.my_number}}

CONCAT( "CUSTOMER"."C_ADDRESS", '{{parameters.my_string}}' )

CONCAT( "CUSTOMER"."C_ADDRESS", '{{parameters.accepted_values[0]}}' )

📘

On Parameter Value Resolving

Note that {{parameters.my_number}} will not resolve to 1 (in the above example) until the node is actually rendered. In other words, the value in the transform field will remain "{{parameters.my_number}}".

Using Parameters in a Node Type Template

In the Node Type Editor, Parameters are appended to the metadata. Using Jinja logic, these parameters can be accessed and rendered in the Create and Run Templates if so desired.

They can be inserted into the Jinja Templates following the same format as in transforms (see above) and will run within Stages.

📘

Parameters and Advanced Deploy Strategy

When using parameters as part of an Advanced Deployment Strategy, they need to be referenced with desiredState or currentState. For example, instead of {{parameters.my_number}}, instead use {{desiredState.parameters.my_number}}.