Skip to main content

Testing expressions

You test your expression to check that results are as expected. The following figure is an example of an expression that has been evaluated and tested.

Information note

Testing an expression that contains an analytic function will validate the syntax without actually executing the function. Additionally, the test will only be performed on a single record.

Information note

Compose does not check the data types of columns used in an expression for compatibility. For example, if a column of type integer is used in an expression for a column of type varchar, the expression will not be executed successfully.

Test Expression

To test an expression:

  1. In the Expression Builder window, build an expression as described in Building Expressions.
  2. Click Parse Expression as described in Parsing expressions.
  3. View the parameters that are displayed. If your expression is not valid, an error message is displayed.
  4. Optionally edit the parameters name(s) as described in Editing parameter names.
  5. Type values for each parameter and then click Test Expression to see the expression result.

    For example, using the expression in Test Expression, type Mike for FirstName and Smith for LastName. The result displayed is Mike Smith.

  6. This step is only available for transformations created in the Edit Mappings window. When you create a transformation in the Edit Mappings window, an additional button called Show Data appears to the left of the Test Expression button. You can click this button to see how your expression translates into actual data.

    For example, clicking the Show Data button for the expression UnitPrice*Quantity will open the following window.

    For more information on the Edit Mappings window, see Column mappings in Creating and Managing Storage Zone Tasks .

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!