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. XML Datatype Reference
  10. XPath Query Functions Reference

XML Guide

XML Guide

Generating Rows in Circular Relationships

Generating Rows in Circular Relationships

By default, the Integration Service generates rows for all occurrences of data in a circular relationship. You can choose to create a row for only the first occurrence. Select the Non-Recursive row option.
The following XML file contains a Part element with a circular reference:
<?xml version="1.0" encoding="utf-8"?> <Vehicle xmlns="http://www.PartInvoice.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.PartInvoice.org part.xsd"> <VehInfo>    <make>Honda</make>    <model>Civic</model>    <type>Compact</type> </VehInfo>
<Part>
  <ID>123</ID>   <Name>Body</Name>   <Type>Exterior</Type>   
<Part>
    <ID>111</ID>     <Name>DoorFL</Name>    <Type>Exterior</Type>    
<Part>
      <ID>1112</ID>       <Name>KnobL</Name>       <Type>Exterior</Type>     </Part>    
<Part>
      <ID>1113</ID>       <Name>Window</Name>       <Type>Exterior</Type>     </Part>   </Part> </Part> </Vehicle>
The following figure shows that the Part element is the view row for the X_par_Part view in the XML definition:
The Part element is the view row for the X_par_Part view in the XML definition. The Part element includes associated ID, Name and Type strings.
The following figure shows that the Integration Services generates rows for Part 123 and all of the component parts when you run a session:
The data contains four rows and the columns, par_ID, par_Name, and par_Type. The first value in the par_ID column is 123, followed by the component part values. The NonRecursive Row box above the data is not selected.
The following figure shows that the Integration Service reads the first occurrence of the Part element and generates one row of data for Part 123 when you select NonRecursive Row:
The data contains one row and the columns, par_ID, par_Name and par_Type. The value in the par_ID column is 123. The NonRecursive Row option is selected.

0 COMMENTS

We’d like to hear from you!