Table of Contents

Search

  1. Preface
  2. XML Concepts
  3. Using XML with PowerCenter
  4. Working with XML Sources
  5. Using the XML Editor
  6. Working with XML Targets
  7. XML Source Qualifier Transformation
  8. Midstream XML Transformations
  9. Appendix A: XML Datatype Reference
  10. Appendix B: XPath Query Functions Reference

XML Guide

XML Guide

XML Source Qualifier Transformation Example

XML Source Qualifier Transformation Example

This section shows an example of an XML Source Qualifier transformation in a mapping. The example uses an XML file containing store, product, and sales information.
The following figure shows the StoreInfo.xml file:
The StoreInfo.xml file shows store, product, and sales information.
You might want to calculate the total YTD sales for each product in the XML file regardless of region. Besides sales, you also want the names and prices of each product.
To do this, you need both product and sales information in the same transformation. However, when you import the StoreInfo.xml file, the Designer creates separate groups for products and sales by default.
The following figure shows the default groups for the StoreInfo file with the product and sales information in separate groups:
The mapping includes an XML source, an XML Source Qualifier, an Aggregator transformation, and a target. In the Source Qualifer, PRODUCT and SALES are separate groups.
Since you cannot link both the Product and the Sales groups to the same single input group transformation, you can create the mapping in one of the following ways:
  • Use a denormalized group containing all required information.
  • Join the data from the two groups using a Joiner transformation.

0 COMMENTS

We’d like to hear from you!