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

Using XML Sources Directly in Table Pair or Single Table Tests

Using XML Sources Directly in Table Pair or Single Table Tests

In a Table Pair or Single Table, when an XML definition is used, the XML Group drop-down is enabled, showing the groups for that XML definition.
If you are using an XML definition directly in a Table Pair or Single Table, select the XML Group from the drop down to identify which data you want to test.
The following image shows how to select an XML group:
Once the XML Group is selected, the elements in that group are available for testing just like any other data source.
Note that this method restricts you to only the elements in the particular group you select. In the above example, if the XML file has the structure shown below, only those fields under X_EMPLOYEE , including EMPID, LASTNAME, FIRSTNAME, are accessible. To access fields under one of the other groups, select one of those groups instead.
The following image shows the fields for each XML group:
The columns starting with XPK_, such as XPK_EMPLOYEES and XPK_EMAIL and FK_, such as FK_EMPLOYEES and FK_EMPLOYEE, are columns that are automatically added when the XML definition is imported into PowerCenter. These are primary and foreign key columns used to associate related data across different groups. For example, primary and foreign key columns associate X_EMPLOYEE to X_EMAIL.
XML group definitions have the following limitations:
  • An XML definition can have up to 400 groups.
  • A group in a source definition does not require a key.
  • A group can have one primary key.
  • A group can be related to several other groups, and a view can have multiple foreign keys.
  • A column cannot be both a primary key and a foreign key.
  • A foreign key always refers to a primary key in another group. You cannot use self-referencing keys.
  • A generated foreign key column always refers to a generated primary key column.
For more information, see the
PowerCenter XML Guide
.