Understanding the Import Process
To help you troubleshoot and import flat file data, the file layout definition provides a data preview page. It can also generate an Application Engine program with the associated PeopleCode that is necessary to import the data.
Note:
The Application Engine program that the system automatically generates should be viewed as containing sample PeopleCode that you need to review and modify, especially when a single file layout involves multiple records.
Data Import Activities
Importing data by using a file layout requires the following sequence of activities:
-
Provide the import data in a properly formatted flat file.
Each record in the file must correspond to a record with the same name in the PeopleSoft database, and its fields must have the same names and data formats as the fields in the database record. Each record in the file must end with a new line character.
-
Create a file layout definition to match the record and field structure of the data.
Insert the appropriate record definitions into the file layout, and then reposition the file records and file fields to match the record and field positions in the file.
-
Preview and troubleshoot the input data format and content.
-
Generate the data import Application Engine program and PeopleCode.
-
Run the Application Engine program to import the data.
Field Inclusion and Exclusion
The fields in the records of the data file can be a subset of the fields in the database record. Define your file layout with only the file fields that you expect to receive.
The fields in the records of the data file can be a superset of the fields in the database record; you must define your file layout to suppress or ignore the extra fields. For FIXED files, do not define a field at the corresponding position in the file layout definition. For CSV files, the file layout must have the same number of fields in each record as there are in the corresponding file record; for each field that you do not want to import, define a field in the file layout at that position that does not correspond to any field in that database record. For XML files, the system automatically ignores any extra fields.
Your data file can contain a subset or a superset of the records that are defined in the file layout. The system imports only a file record with a matching file record ID in the file layout.
Record Hierarchy
In theory, you can ignore rowset hierarchy when importing file data, because the PeopleSoft database stores each record independently of the others, and the import process does not use rowsets. However, many records are designed with hierarchical dependencies in mind. The input file might omit inherited field values or order the data records in a way that reflects such dependencies.
If the input file omits inherited field values, make sure that the records in the file layout of the inheriting fields are children of the ones from which they inherit their values and set up Field Inheritance appropriately.
If the records to be imported contain key fields that reflect a rowset hierarchy, they might be in an order in the file that also reflects the hierarchy. Make sure your file layout reflects that hierarchy as well.
Important:
The completed file layout must have exactly one file record at the root level; all other file records must be below that level.
Related Topics