Database Reference
In-Depth Information
Note This pattern works well if you have a single level of nested XML elements that
you need to join. If you have multiple levels of XML elements and you need to join
more than two of the XML Source outputs, you'll need to use the Sort transform.
Listing 9-3 contains an XML document with customer information. We'll use this
document as our example for the remainder of the chapter.
Listing 9-3 . Sample XML Document
<?xml version="1.0" encoding="utf-8"?>
<Extract Date="2011-07-04">
<Customers>
<Customer Key="11000">
<Name>
<FirstName>Jon</FirstName>
<LastName>Yang</LastName>
</Name>
<BirthDate>1966-04-08</BirthDate>
<Gender>M</Gender>
<YearlyIncome>90000</YearlyIncome>
</Customer>
<Customer Key="11001">
<Name>
<FirstName>Eugene</FirstName>
<LastName>Huang</LastName>
</Name>
<BirthDate>1965-05-14</BirthDate>
<Gender>M</Gender>
<YearlyIncome>60000</YearlyIncome>
</Customer>
</Customers>
</Extract>
The XML Source component will generate a separate output for each nested XML
element. There will be three outputs for the XML document in Listing 9-3 : Cus-
tomers , Customer , and Name . Each output contains the elements and attributes that
were defined in the schema, as well as an <element_name>_Id column, which acts
 
 
Search WWH ::




Custom Search