Creating Data Sources

This section provides an overview of data generation and discusses how to create schema and sample data.

In BI Publisher, the data extraction is separate for the data presentation. Sample data can be used to design your RTF template and map your PDF templates. The data schema file is an XML Schema Definition (XSD) file that defines the structure and elements in the extracted XML. Data schema was used in previous releases for the bursting feature and is still available for backwards compatibility and bursting. If PeopleSoft queries are used for data extraction, the system will generate the schema; for all other data sources, you must create the data schema using tools outside of the PeopleSoft system. Schemas are also used for data transformation.

See Using Data Transform.

BI Publisher can register PS/Query, Connected Query, and XML files as a data source, but you can generate XML data using any means including PS/Query, SQR, Application Engine, PeopleCode, File Layout, and so forth.

For RTF template-based reports, design your data source XML structure using groupings that resemble the groupings needed for the output report. This improves runtime performance by preventing unnecessary grouping by the formatting engine.

Use sample data source information for developing your RTF report templates, defining bursting, and mapping your PDF templates.

Storing the sample data file in PeopleTools provides a means to:

  • Insert form field tags in RTF templates

  • Conduct PDF mapping.

  • Choose the bursting field during design time.

  • Preview the template.

Sample Data File

Requirements for the structure of XML sample data file include:

  • Must consist of a root node with one repeating group.

    Textual elements in this repeating group are candidates for bursting.

  • Elements should have textual content.

    Element should not be empty.

  • All expected elements must be included.

    All text elements should contain default values. All defined elements can be used for mapping.

This is an example of a sample XML file used as a data source:

<?xml version="1.0" encoding="UTF-8"?>
<root>
   <taxroot>
      <Box_Year>2005</Box_Year>
      <Box_Form>W2</Box_Form>
      <EE_SSN>111-11-1111</EE_SSN>
      <ER_EIN>ER_111111111</ER_EIN>
      <Employee>
          <EE_FirstName>Incheol</EE_FirstName>
          <EE_LastName>Kang</EE_LastName>
          <EE_Address1>500 Oracle Parkway</EE_Address1>
          <EE_Address2>Redwood Shores</EE_Address2>
          <EE_Address3>CA 94065</EE_Address3>
      </Employee>
      <Employer>
          <ER_Name>Oracle USA</ER_Name>
          <ER_Address1>500 Oracle Parkway</ER_Address1>
          <ER_Address2>Redwood Shores</ER_Address2>
          <ER_Address3>CA 94065</ER_Address3>
      </Employer>
      <Tax>
          <Fed_Wages_COR>20000</Fed_Wages_COR>
          <Fed_Tax_COR>20000</Fed_Tax_COR>
         <RETIRE_EE_PRV>Y</RETIRE_EE_PRV>
      </Tax>
   </taxroot>
   </root>
  

Note: In this example, the elements Box_Form, Box_Year, EE_SSN and ER_EIN are available as burst candidates. All of the elements will be available for mapping.

The actual data file may contain repeated instances of the high level repeating group, as shown in this example:

<?xml version="1.0" encoding="UTF-8"?>
<root>
   <taxroot>
      <Box_Year>2005</Box_Year>
      <Box_Form>W2</Box_Form>
      <EE_SSN>111-11-1111</EE_SSN>
      <ER_EIN>ER_111111111</ER_EIN>
      <Employee>
          <EE_FirstName>Incheol</EE_FirstName>
          <EE_LastName>Kang</EE_LastName>
          <EE_Address1>500 Oracle Parkway</EE_Address1>
          <EE_Address2>Redwood Shores</EE_Address2>
          <EE_Address3>CA 94065</EE_Address3>
      </Employee>
      <Employer>
          <ER_Name>Oracle USA</ER_Name>
          <ER_Address1>500 Oracle Parkway</ER_Address1>
          <ER_Address2>Redwood Shores</ER_Address2>
          <ER_Address3>CA 94065</ER_Address3>
      </Employer>
      <Tax>
          <Fed_Wages_COR>20000</Fed_Wages_COR>
          <Fed_Tax_COR>20000</Fed_Tax_COR>
         <RETIRE_EE_PRV>Y</RETIRE_EE_PRV>
      </Tax>
   </taxroot>
   <taxroot>
       <Box_Year>2005</Box_Year>
       <Box_Form>W2</Box_Form>
       <EE_SSN>2222-22-2222</EE_SSN>
       <ER_EIN>ER_222222222</ER_EIN>
       <Employee>
           <EE_FirstName>Chang</EE_FirstName>
           <EE_LastName>Yu</EE_LastName>
           <EE_Address1>500 Oracle Parkway</EE_Address1>
           <EE_Address2>Redwood Shores</EE_Address2>
           <EE_Address3>CA 94065</EE_Address3>
       </Employee>
       <Employer>
            <ER_Name>Oracle USA</ER_Name>
            <ER_Address1>500 Oracle Parkway</ER_Address1>
            <ER_Address2>Redwood Shores</ER_Address2>
            <ER_Address3>CA 94065</ER_Address3>
       </Employer>
       <Tax>
            <Fed_Wages_COR>10000</Fed_Wages_COR>
            <Fed_Tax_COR>10000</Fed_Tax_COR>
            <RETIRE_EE_PRV>Y</RETIRE_EE_PRV>
       </Tax>
     </taxroot>
   </root>
  

Schema File

This is the sample schema for the XML file shown previously:

<?xml version="1.0"?>
<xs:schema id="root" targetNamespace="http://tempuri.org/example_xml.xsd"
xmlns:mstns="http://tempuri.org/example_xml.xsd" 
xmlns="http://tempuri.org/example_xml.xsd" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" 
attributeFormDefault="qualified" elementFormDefault=
"qualified">
  <xs:element name="root" msdata:IsDataSet="true" 
    msdata:EnforceConstraints="False">
    <xs:complexType>
      <xs:choice maxOccurs="unbounded">
        <xs:element name="taxroot">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Box_Year" type="xs:string" minOccurs="0"/>
              <xs:element name="Box_Form" type="xs:string" minOccurs="0"/>
              <xs:element name="EE_SSN" type="xs:string" minOccurs="0"/>
              <xs:element name="ER_EIN" type="xs:string" minOccurs="0"/>
              <xs:element name="Employee" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="EE_FirstName" type="xs:string" 
                     minOccurs="0"/>
                    <xs:element name="EE_LastName" type="xs:string" 
                     minOccurs="0"/>
                    <xs:element name="EE_Address1" type="xs:string" 
                     minOccurs="0"/>
                    <xs:element name="EE_Address2" type="xs:string" 
                     minOccurs="0"/>
                    <xs:element name="EE_Address3" type="xs:string" 
                     minOccurs="0"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="Employer" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="ER_Name" type="xs:string" minOccurs="0"/>
                    <xs:element name="ER_Address1" type="xs:string" 
                     minOccurs="0"/>
                    <xs:element name="ER_Address2" type="xs:string" 
                     minOccurs="0"/>
                    <xs:element name="ER_Address3" type="xs:string" 
                     minOccurs="0"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="Tax" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Fed_Wages_COR" type="xs:string" 
                     minOccurs="0"/>
                    <xs:element name="Fed_Tax_COR" type="xs:string" 
                      minOccurs="0"/>
                    <xs:element name="RETIRE_EE_PRV" type="xs:string" 
                     minOccurs="0"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>

Note: Schema and sample data are generated for the PeopleSoft Query data source.