Loading Staging Tables

Staging tables are a set of database tables that are designed based on the event layouts published by the government. They are used to store the event information that the system uses to generate XML files.

Here are the high-level steps to load processed event data to staging tables for XML file generation, which is part of the mapping process:

  1. Identify rows from the driver record that match run control parameters, and insert them to the Temporary record.

  2. Clean up staging records. Check and remove any existing, irrelevant data rows (from previous processes) from the staging records, which are also available in the Temporary record.

  3. Insert data from PeopleSoft application records and the Temporary record to corresponding staging records.

    The eSocial functionality can access data a lot quicker from staging tables than from the original PeopleSoft transaction tables, posing as little impact as possible on performance.

  4. Update the row statuses:

    1. For rows that are added to staging tables successfully, row status is set to MAPP in Temporary and driver records.

    2. For rows that cannot be added to staging tables, row status is set to ERRM in Temporary and driver records.

    3. For rows that have XMLs created successfully, row status is set to XCRT in Temporary and driver records.

  5. Generate log file entries for data rows that are not added to staging records successfully.