186 Patterns: Information Aggregation and Data Integration with DB2 Information Integrator
Example B-7 shows the command line version of creating the RWDMKT server
definition.
Example: B-7 XML - Create server statement
CONNECT TO PATTERN;
CREATE SERVER RWDMKT WRAPPER "XML";
CONNECT RESET;
Create the XML nickname
After setting up the XML wrapper and the XML server definition, we can create
the actual link to an XML file, a directory containing an XML file, or a URI.
Example B-8 shows content of the RewardsXML file used in the DFS portal.
Example: B-8 Content of the RewardsXML file
<?xml version="1.0" encoding="UTF-8" ?>
- <!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by Bill
Mathews (IBM)
-->
- <!-- Druid Bank Credit Card Rewards
-->
- <Reward xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="C:\MyShares\RewardsXML\Rewards.xsd">
<id>100001</id>
<Short_Name>Travel2004</Short_Name>
<Description>Druid Bank Credit Card Travel Purchase Awards</Description>
<Sponser>DruidBankTravel.com</Sponser>
<Card_Type>VISA</Card_Type>
- <Affiliation>
<Name>We Get You There Airlines</Name>
<Points>3</Points>
<per_unit>1</per_unit>
<unit_type>Dollar</unit_type>
<Marketing_Msg>Use your Druid Bank Credit Card to purchase your "We Get You
There Airlines" tickets at DruidBankTravel.com and receive 3 points for every
dollar spent!</Marketing_Msg>
Note: There can be multiple server definitions for each defined XML wrapper
Attention: Unlike some of the other data sources, there are no user mappings
associated with XML data sources since the federated server user ID must
have access to the XML file or directory.
Appendix B. Configuring data sources in DB2 Information Integrator 187
</Affiliation>
- <Affiliation>
<Name>Fresh Air Hotels</Name>
<Points>2</Points>
<per_unit>1</per_unit>
<unit_type>Dollar</unit_type>
<Marketing_Msg>Use your Druid Bank Credit Card to pay for hotel stays at
Fresh Air Hotels booked through DruidBankTravel.com and receive 2 points for
every dollar spent (excluding parking)!</Marketing_Msg>
</Affiliation>
</Reward>
Select and expand RWDMKT, right-click Nicknames, and click Create. This is
similar to the actions taken for the CHKSVG in Figure B-9 on page 178.
This action opens up a dialog window, as displayed in Figure B-18.
Figure B-18 XML - Create nickname
Figure B-18 is similar to Figure B-10 on page 179 and provides two options (Add
and Discover) for adding a nickname.
We chose to click Add to open up the dialog window shown in Figure B-19 on
page 188
.
188 Patterns: Information Aggregation and Data Integration with DB2 Information Integrator
Figure B-19 XML - Create nickname Add screen
Click the Add button to add the various columns, data types, and settings, as
shown in Figure B-20 on page 189, Figure B-21 on page 189, Figure B-22 on
page 190, Figure B-24 on page 191, and Figure B-24 on page 191.
Appendix B. Configuring data sources in DB2 Information Integrator 189
Figure B-20 Add column and data type details
Figure B-21 Add column settings
190 Patterns: Information Aggregation and Data Integration with DB2 Information Integrator
Figure B-22 Completed list of columns with data types
Figure B-23 Nickname settings

Get Patterns: Information Aggregation and Data Integration with DB2 Information Integrator now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.