Peoplesoft Data Archival Confiuration
Peoplesoft Data Archival Confiuration
Document control
Document title Data Archival Configuration Peoplebooks 8.42 Version Version 0.1 Document reference Authors Date Authorised by Date Approvers (optional) Date Status of this version (draft/ issued for comment/ authorised/approved/ authorised and approved)
Page 1 of 12
Archiving to history tables involves the use of tables that you create for the sole purpose of storing archived data. It is up to you to determine whether this archived data should be stored in these history tables temporarily or for long-term. By definition, history tables are identical copies of the online tables with the exception of an additional column: PSARCH_ID. The system uses this key field to denote when a piece of data was archived and to uniquely identify it. If you design a custom archiving scheme, you'll need to create the history tables using Application Designer. 1. In step 1, data is moved into the history tables. This is known as the selection process. This will allow you to query the selected data for information and delete them from the online tables. 2. If you accidentally delete the data from the online tables, there is a process to restore the data back from the history tables. Step 2 shows this rollback process. 3. When you no longer need to reference the data from the history tables, you can move them to flat files and delete them completely from the system. Step 3 shows this export process. 4. If necessary, you can return the archived data back into the system using staging tables. Staging tables are identical to online tables. This import process is shown as step 4 in the preceding diagram.
In the same way create other archiving records which needed to be archived.
Page 2 of 12
Page 3 of 12
Now based on the records we need to archive and the corresponding history records we need to add in this page along with the criteria to be archived. See screen shots above.
The description and use of all the fields in the Record Criteria page are as given below.
Page 4 of 12
An Archive ID is used to identify a group of transactions as an archive definition during the archiving process. Use up to 30 characters to describe the archive. Enables the user to archive the project directly to a flat file without having to create history tables.
Copy Archive Allows the current archive project to be copied to a new archive ID. All tables, criteria, ID and other criteria are copied to the new archive ID. Archiving Record History Record Copy Table Select the online tables to be archived. You can archive multiple online tables within one archive ID. History tables are copies of the online table with the additional PSARCH_ID field. This is where the archived data will be stored. Copies all criteria to a new row in the existing archive ID. Useful if you are dealing with multiple tables.
Go to Transfers you to the Archiving Process page. Request Page Go to Report Transfers you to the Report Request page. Page FieldName Operator Value to Match Columns in the online tables to specify archive criteria. Specifying the fields and adding the conditions is comparable to the WHERE clause in a SQL statement. =, <>, <, >, <=, >=, LIKE, NOT LIKE Column value to match against, as in 07/01/1999 or $75,000. You can also use special parameter markers in the format of %PSPARMnn% where nn can be any number. For example, valid parameter markers could be %PSPARM1% or %PSPARM18%. When the system generates the SQL statement, %PSPARMnn% is embedded in to the SQL statement and substituted with values entered using the run control pages. One example of implementing this is to create an archive project based on a business unit and then enter the actual business unit at run time. A/O Toggle between AND and OR. This button is only visible if you have added multiple lines to the field list.
Page 5 of 12
If there are dependencies from other tables in the archiving template, such as parent/child relationships or joining against reference tables, you must insert the criteria into this page. This can also be done by selecting the Copy Parent Record check box. For this to work correctly, the parent table criteria must already exist on the Record Criteria page. In the above example all the case records should be joined with RC_CASE which is the parent record.
The description and use of all the fields in the Join Record Criteria page are as given below.
Archiving Record
Page 6 of 12
Copy Parent Allows the criteria that exist in the parent record on the Record Criteria page to be Record copied to the Join Record Criteria page. When you click this, an edit box appears to the right that you use to select the parent table. Record Name Select the name of the table to be joined. You can request multiple table joins per archiving table. The two tables must share common keys. Field Name Operator Value to Match A/O Select the columns in the online tables to add to the archive criteria. =, <>, <, >, <=, >=, LIKE, NOT LIKE. Enter a column value to match. See Record Criteria discussion for description of using parameter markers. Change And to Or, and vice versa.
SQL Designer Page: The SQL Designer page is useful for generating and editing the SQL that will be used to perform the archive process. In addition, you can count the number of rows that will be affected by the current archive process and check for duplicate rows that the SQL is affecting. To access this page, you must have entered basic information on the Record Criteria and Join Record Criteria pages. Data Archival Configuration Page 7 of 12 Last modified 31/03/2013 6:12 a3/p3
Page 8 of 12
The description and use of all the fields in the SQL Designer page are as given below.
Page 9 of 12
Produces the SQL statements for the current record. The following types of SQL are created: Delete from the online tables (Archive Delete). Remove data from history tables (Remove from History). Rollback (Archive Rollback). The SELECT that moves rows from the online table to the history table (Archive Selection).
Describes the processes that have been selected on the Archive Data page. Returns the row count of what the generated SQL will affect.
Chk Dup Rows Checks to see if an incorrect join will cause duplicate rows to be archived. (check duplicate rows) Edit SQL Allows you to modify the generated SQL. If you edit and save the SQL, a flag will be used to identify that the SQL is user modified and is not system generated. When you modify the SQL and save it, the text above the edit box indicates that the SQL has been altered from the original, system-generated SQL. Enables you to execute the generated SQL. Typically, this button used by the archive developer during the development and testing of the archive. After the archive template is developed, an Application Engine program executes the SQL in batch.
Run SQL
In the same way create all the archive templates needed to archive the records.
Page 10 of 12
Now in the above page select the Archive id which was created in the previous steps.
Select an existing archive ID. Once youve selected an archive ID, click this button to display all the tables to be included in the archive project. Transfers you to the Archive Designer interface. Select which archive process you want to run:
Page 11 of 12
Selection copies the data from the online tables to the history tables. Rollback copies the data from the history tables to the online tables. Delete removes the data from the online tables, only when they have already been copied to the history tables. Remove from History deletes the data from the history tables.
Select the check box to enable the Commit After option, which specifies how many rows of data the system processes before issuing a database commit. Otherwise, the system issues a commit after each record has been processed. If you have any custom Application Engine programs that you want to run against your data either before or after archiving, specify the appropriate program here. Pre AE. Select an existing Application Engine program to run before the archiving process. Post AE. Select an existing Application Engine program to run after the archiving process.
Check box indicating if the table should be processed at run time The tables containing the data to be archived. If your archive template contains runtime parameters (%PSPARMnn%), specify a value that the system should substitute into the SQL statement at run time.
History Tables The tables where the system stores the archived data.
In the same manner we have to create run control ids for other Archive ids. NOTE: For further details on running the Archive Process in detail refer to, crFuncDD_Data_Archival_10845_v0.1.doc (Section 3 Data Archiving)
Page 12 of 12