Creating and Registering Data Sources

This chapter discusses how to:

Click to jump to parent topicCreating Data Sources

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

Click to jump to top of pageClick to jump to parent topicUnderstanding Data Generation

In XML 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. 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.

XML 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.

Click to jump to top of pageClick to jump to parent topicCreating Schema and Sample Data

Use sample data source information for developing your RTF report templates, defining bursting, and mapping your PDF templates. Schema files are no longer necessary as of PeopleTools 8.50, but can still be defined for backwards compatibility with previous PeopleTools releases.

Note. New PDF mapping are not supported if a schema file is used.

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

Sample Data File

Requirements for the structure of XML sample data file include:

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.

Click to jump to parent topicRegistering Data Sources

This section provides an overview of data source registration and discusses how to register data sources.

Click to jump to top of pageClick to jump to parent topicUnderstanding Data Source Registration

A data source registers the schema and sample data design files. The extracted application fields from the data source files are placed into the template files to create the final report.

The data source can be PS Query, Connected Query, or XML files.

Note. PeopleSoft queries with in tree prompts are not allowed as a data source.

Benefits of data source registration include the ability to:

  1. Reuse previously registered data sources with multiple report definitions.

  2. Take advantage of built-in bursting features.

    See Setting Bursting Options.

Note. When creating a report definition, you can select a PS Query data source that has not yet been registered and that data source is registered automatically when you save the report definition. However, all other types of data sources must be registered before they can be associated with a report definition.

Note. You can check the format of an XML output file by opening it using Microsoft Internet Explorer (IE). IE opens the file and alerts you to any problems, such as unclosed tags.

Click to jump to top of pageClick to jump to parent topicPage Used to Register Data Sources

Page Name

Definition Name

Navigation

Usage

Data Source

PSXPDATASRC

Reporting Tools, XML Publisher, Data Source

Register existing processes that supply XML data for reports.

Register optional schema and sample data files for XML Publisher data sources.

Click to jump to top of pageClick to jump to parent topicRegistering Data Sources

Access the Data Source page (Select Reporting Tools, XML Publisher, Data Source.)

Data Source Type

Select PS Query, Connected Query, or XML File.

Data Source ID

Select or enter the data source ID.

When you are adding a new data source, for PS Query data source types, the corresponding data source ID listing is pulled from Query Manager.

For other data source types, this field accepts free-form text entry. Enter an ID that indicates what the data is, because you want to easily identify your data sources when defining reports.

Description

(Optional) Enter descriptive text that provides more detail about the data source.

The description is automatically supplied by default to the data source ID.

Object Owner ID

(Optional) Indicate which product, feature, or application owns this data source.

This field is used to extract and package production data source and report registrations and their supporting files.

Registered Date/Time

This is a read-only field maintained by the system that indicates the date that the initial data source registration was made.

Last Update Date/Time

This is a read-only field maintained by the system that indicates the date that the last update to the data source was made.

Active

Select to indicate that this is an active data source.

Only active data sources can be chosen when creating a new report definition. Only reports with active data sources can be processed.

Registered By

This is a read-only field maintained by the system that indicates the user ID of the operator who initially registered the data source.

Updated By

This is a read-only field maintained by the system that indicates the user ID of the operator who last updated the data source.

Related Files

The sample data file is an XML file with sample data that is used for data mapping, template preview, and determining burst fields. Preview action is available within a desktop template designer or from within the report definition page. For PS Query and Connected Query data source types the sample data file can be system-generated or uploaded. For XML file data source type, the sample data file must be uploaded,

Note. Prior to PeopleTools 8.50, the sample data field was only used for data mapping and preview.

In PeopleTools 8.50, the schema file is deprecated. In prior releases, the schema file which is an XML Schema Definition (XSD) file that defines the structure and elements that is in the extracted XML data, was used required for bursting. In PeopleTools 8.50, the sample data file is used for bursting.

File

(Optional) Click the file name links to view the XML and XSD files after you have generated, regenerated, or uploaded them.

Last Update Date/Time

(Optional) This is a read-only field maintained by the system that indicates the date that the last update to the related file was made.

Generate/Regenerate

(Optional) Click the Generate link for PS Query or Connected Query data sources to generate the related sample data .

When the related files have been initially generated for PS Query or Connected Query data sources, click the Regenerate link to regenerate them in case the underlying query has changed.

Upload

(Optional) Click the Upload link for XML file data sources to bring the related sample data and schema files into the database.

You can also upload a sample data file for PS Query or Connected Query if you would prefer to use a sample data file with more realistic data.

Note. A validation is run against the schema XSD file that is uploaded to a data source, alerting the developer if problems occurred while the system was using their schema.