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.