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

Setting the Force Row Option

Setting the Force Row Option

By default, the Integration Service generates data for a view when the view row has data. Select Force Row to generate a row for the XML view whether or not the view row element contains data. For example, if a view row is address\zip, you can choose to output address, even if the view row has no zip data.
The following figure shows the zip element as the view row:
The zip element is highlighted at the bottom of the list, with the street, city and state element rows listed above it.
By default, the Integration Service generates a row for every occurrence of the zip element within the address element.
For example, you might process the following XML file in a session:
<?xml version="1.0" ?> <company xmlns="http://www.example.org"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xsi:schemaLocation="http://www.example.org forcerow.xsd" > <name>company1</name>   <address>     <street>stree1</street>     <city>city1</city>     <zip>1001</zip>   </address> <employee>   <name>emp1</name>   <address>     <street>emp1_street</street>     <city>empl_city</city>     </address> </employee> <employee>   <name>emp2</name>   <address>     <street>emp2_street</street>     <city>emp2_city</city>    <zip>2001</zip>   </address> </employee> </company>
By default, the Integration Service generates the stree1 and emp2_street rows for the Address view.
The following figure shows the stree1 and emp2_street rows for the Address view:
The data contains two rows and shows values for the columns STREET, CITY, and ZIP. The Force Row option is not selected.
The Integration Service does not generate a row for emp1, because the view row is zip, and emp1 has no data for the zip element.
If you enable Force Row, you can output the street and city elements with or without the zip. The session generates a row for emp1, even though emp1 does not have data for the zip element.
The following figure shows the rows that the Integration Service generates when you enable Force Row:
The data contains three rows and shows values for the columns STREET, CITY, and ZIP. The Force Row option is selected.

0 COMMENTS

We’d like to hear from you!