To nest expression parameters, you can assign expression parameters to different ports and use the ports in other expression parameters.
For example, you might have data on dates that customers opened and closed accounts with your company. You want to inspect the data to ensure that the dates in your system are valid. If the dates are not valid, you want to issue a warning.
To inspect the data, you can create an Expression transformation and configure the following ports:
The input port
SignUpDate
is the date that a customer opened an account. The input port
CancelDate
is the date that a customer closed an account.
The variable port
CompareDates
returns -1, 0, or 1 depending on whether the value in the port
CancelDate
is earlier or later than the value in the port
SignUpDate
. The port
GenerateAlert
returns 'Warning' if the value in the port
CompareDates
is 1.
For the variable port
CompareDates
, you can configure an expression parameter with the following default value:
DATE_COMPARE(SignUpDate,CancelDate)
To nest the expression parameter that you use for the variable port
CompareDates
in the expression parameter for the output port
GenerateAlert
, you can configure an expression parameter with the following default value: