About: This article introduces the Set Parameter node, a Special node within Construct.
Location: Node panel
Table of Contents
Feature Overview
The Set Parameter node (or Set Param node) allows the value of a parameter to be dynamically determined by the value contained in the dataset feeding into it. It is a way to have parameter values be determined or updated without the user needing to enter a parameter value.
A job needs to contain one or more parameters to use the Set Parameter node. This node accepts a data stream and looks to use the values from the data in the columns to set as the value of the job parameter(s).
Because a parameter can only contain a single value at a time, the data columns feeding the Set Parameter node also need to be reduced to a single value within a single row.
When configuring the Set Parameter node, all available data columns are listed as well as their data types. The user can then use the green P button to select which of the available job parameters the column value should fill.
Note: The data type of the column needs to match the data type assigned to the parameter.
Example
Consider a job containing parameters for a Start and End date.
To dynamically fill the value of those parameters depending on the current year, a dataset containing this information for several years can be used along with the Set Parameter node.
Because the Start Date and End Date parameters cannot take on all the values in the dataset, it needs to be reduced to a single row. In this case only the most recent TermStart and TermEnd dates are desired. So this dataset can be filtered to take only the row with the Year equal to 2022.
Now the single record with one value for each column can be used to assign those values to the job parameters.
When the job is run, the parameter values will be assigned and used through out the job.
Notes:
- For the Set Parameter node in your job to run, the entire job must be run using the Run Job option in the toolbar. Using Run this node only option will not run the Set Parameter node.
- The Set Parameter node can be bypassed without removing it by using the Run this node only option (right-click the output node).
- Since the order of operation is important for this process to work, make sure the Set Run Order configuration is set up properly.
Video Tutorial
Comments
0 comments
Article is closed for comments.