You can reference the parameter in an Expression after you define the parameter. The following example shows how to assign a parameter to a component in a filter expression.
In the Filter transformation, click the
Filter
tab.
The Expression Editor appears. You can select functions, ports, and parameters to create the expression.
Select
Specify By Value
to define the expression instead of using an expression parameter.
On the Filter tab, click the
Ports
tab.
Select the Amount port. On the
Functions
tab, select the greater than (>) function.
The following image shows the expression that contains the Amount port and the > operator:
Click the
Parameters
tab in the Expression Editor.
The Expression Editor lists the system parameters and the user-defined parameters.
Click
Manage Parameters
to add a parameter.
The
Parameters
dialog box appears.
Click
New
.
A dialog box appears with default parameter values.
Enter the parameter name, parameter type, precision, and default value.
The following image shows the
Parameters
dialog box:
In the Expression Editor, click
OK
The parameter that you created appears in the parameter list.
Select the Min_Order_Amount parameter to add it to the expression.
The Min_Order_Amount parameter appears in the expression.
The parameter appears in the expression with a dollar sign ($) identifier. The Min_Order_Amount default value is 50. If you add the transformation to a mapping without overriding the Min_Order_Parameter, the Filter transformation returns rows where the Amount is greater than 50.