Table of Contents

Search

  1. Preface
  2. Introduction to Data Validation Option
  3. Repositories
  4. XML Data Source
  5. Tests for XML Data Sources
  6. Connections
  7. Expressions
  8. Table Pairs
  9. Tests for Table Pairs
  10. Single-Table Constraints
  11. Tests for Single-Table Constraints
  12. Examples of Tests from Spreadsheets
  13. SQL Views
  14. Lookup Views
  15. Join Views
  16. Aggregate Views
  17. Business Intelligence and Reporting Tools Reports
  18. Dashboards
  19. DVOCmd Command Line Program
  20. Troubleshooting
  21. Appendix A: Datatype Reference
  22. Appendix B: Reporting Views
  23. Appendix C: Metadata Import Syntax
  24. Appendix D: Jasper Reports
  25. Appendix E: 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
    .