XML is a commonly used format for moving data within and across enterprises. It is easily transported, machine independent, and can handle complex data relationships. The hierarchical nature of XML makes parsing and processing XML data more complex than table or flat file data. Testing XML data in ETL or other application scenarios is much more tedious, time consuming, and error prone than flat file or relational data.
XML hierarchies need to be traversed and often flattened in order to process the underlying XML data. For example, when you test whether XML data was loaded correctly into a relational table, the data needs to be read, flattened, and loaded into tables and then tested against the relational structures. Developers typically write code or use tools like PowerCenter or SQL with XML extensions to flatten the XML hierarchy.
Data Validation Option removes the complexity of testing XML data and provides the flexibility to test in both XML and non-XML data scenarios. You can use Data Validation Option to flatten XML without staging, and then create and execute tests quickly and easily. You can test applications that process XML in the same way that you test applications with relational data. You can also test XML data with other types of data, such as flat files, mainframe data, or data on premise or on the cloud.
You can work with XML data in Data Validation Option in the following ways:
You can include PowerCenter XML sources and targets as tables in single-table constraints and table pairs.
You can include one or more XML groups in the XML hierarchy in a single-table constraint or table pair. By default, you can include one XML group in a single-table constraint or table pair.
To include multiple XML groups, create a join view based on the XML file. The join view converts the hierarchical XML data to a relational structure. You can specify which XML groups to include in the join view. You can use the join view as a table in a single-table constraint or table pair.
You can reuse the same join view for multiple XML files that have the same structure. For example, you create a join view based on an XML file and add the join view to a table pair. You create another table pair based on the same join view and override the XML connection properties. You change the XML connection to point to a different XML file in a different location.