Table of Contents

Search

  1. Preface
  2. Introduction to Data Validation Option
  3. New Features and Behavior Changes
  4. Repositories
  5. XML Data Source
  6. Tests for XML Data Sources
  7. Connections
  8. Expressions
  9. Table Pairs
  10. Tests for Table Pairs
  11. Single-Table Constraints
  12. Tests for Single-Table Constraints
  13. Examples of Tests from Spreadsheets
  14. SQL Views
  15. Lookup Views
  16. Join Views
  17. Aggregate Views
  18. Business Intelligence and Reporting Tools Reports
  19. Dashboards
  20. DVOCmd Command Line Program
  21. Troubleshooting
  22. Datatype Reference
  23. Reporting Views
  24. Metadata Import Syntax
  25. Jasper Reports
  26. Glossary

Data Validation Option User Guide

Data Validation Option User Guide

Creating an Expression

Creating an Expression

Use the Expression Editor to create an expression that consists of fields, functions, and parameters. You can use the Expression Editor wherever you can use an expression instead of a field name. When you create an expression, you can view the definitions of PowerCenter functions. You can also view the properties of the fields in the table that you are testing.
  1. In the dialog box in which you are creating a test, select the
    Field is Expression
    option.
  2. Click the
    Expression Editor
    button.
    The
    Expression Editor
    dialog box appears.
  3. To add a function to the expression, click the
    Functions
    tab, and then perform the following tasks:
    1. Expand
      All Functions
      or expand a function category.
    2. To view the description of a function, click the function.
      The description of the function appears on the
      Functions
      tab. Use the information in the function description to determine what fields you can use in the function.
    3. To add a function at a particular location in the expression text box, place the insertion point at the location.
    4. On the
      Functions
      tab, double-click the function.
  4. To add a field to the expression, click the
    Fields
    tab, and then perform the following tasks:
    1. To view the properties of a field, click the field.
      The properties of the field appear on the
      Fields
      tab.
    2. To add a field at a particular location in the expression text box, place the insertion point at the location.
      To pass a field to a function, place the insertion point within the parentheses that follow the function name, and then add the field.
    3. On the
      Functions
      tab, double-click the field.
  5. To add an operator, perform the following tasks:
    1. In the expression text box, place the insertion point where you want to add the operator.
    2. In the
      Operator Keypad
      , click the operator.
  6. To add a number, perform the following tasks:
    1. In the expression text box, place the insertion point where you want to add the number.
    2. In the
      Numeric Keypad
      , click the number.
  7. In
    Type
    , select the PowerCenter data type that you want to apply to the result.
    The PowerCenter data type must be compatible with the data types of the expression components.
  8. In
    Precision
    , enter the precision for the PowerCenter data type that you selected for the expression.
  9. In
    Scale
    , enter the scale for the PowerCenter data type that you selected for the expression.
    The default value of scale is 0.
  10. To validate the expression, click
    Validate
    .
  11. Click
    Save
    .