Defining Table Properties in a Data Map to Normalize an Array

Defining Table Properties in a Data Map to Normalize an Array

Step 2. Add User-Defined Fields that Demonstrate the Normalization of an Array

Step 2. Add User-Defined Fields that Demonstrate the Normalization of an Array

In this step, you add user-defined fields that invoke PowerExchange functions that demonstrate the normalization an array with multiple occurrences.
The user-defined fields invoke the PowerExchange GenVRowKey and GetSeqWithinLevel functions. These functions add data to the database row test output that demonstrate how the table properties that you defined normalize the array. When you run a database row test, PowerExchange displays one row for each occurrence in the array. For more information about these functions, see GenVRowKey and GetSeqWithinLevel.
  1. Open the demo.map2array data map and the RECORD_IN record.
  2. In the
    Record
    window, click the
    Expr(0)
    tab.
  3. Right-click anywhere on the
    Expr(0)
    tab and click
    Add Field at End
    .
  4. In the cell in the
    Name
    column, enter
    r1genvrow_idx
    .
  5. In the cell in the
    Type
    column, select
    NUM32U
    .
  6. In the cell in the
    Phase
    column, select
    R
    .
    This selection indicates a read operation.
  7. To enter an expression for the field, click in the cell in the
    Expression
    column and click the Browse button.
    The
    Expression Editor
    dialog box appears.
  8. In the
    Function List
    list in the
    Expression Editor
    dialog box, double-click the GenVRowKey function.
  9. In the
    Expression List
    list, enter
    ()
    at the end of the GenVRowKey function name. Click
    Validate
    .
    In the
    Validate
    box, the
    No Errors
    message appears.
  10. Click
    OK
    .
  11. Right-click anywhere on the
    Expr(0)
    tab and click
    Add Field at End
    .
  12. In the cell in the
    Name
    column, enter
    r1genseq
    .
  13. In the cell in the
    Type
    column, select
    NUM32
    .
  14. In the cell in the
    Phase
    column, select
    R
    .
    This selection indicates a read operation.
  15. To enter an expression for the field, click in the cell in the
    Expression
    column and click the Browse button.
    The
    Expression Editor
    dialog box appears.
  16. In the
    Function List
    list in the
    Expression Editor
    dialog box, double-click the GenSeqWithinLevel function.
  17. In the
    Expression List
    list, enter
    ()
    at the end of the GenSeqWithinLevel function name. Click
    Validate
    .
    In the
    Validate
    box, the
    No Errors
    message appears.
  18. Click
    OK
    .

0 COMMENTS

We’d like to hear from you!