Load history purge

This purge deletes the load data from history tables after it completes its typical lifecycle. This reduces the load on frequently accessed tables.

Any enterprise using the Console must schedule purge transactions.

You can use purge codes pseudo-logic to analyze purges. If the last modification made to the load is before the lead time (in days) is met, a load is picked up for purge.

Before you run this transaction, ensure to purge loads and move them to history tables. For more information about purging loads, see Load purge.

Attributes

The following are the attributes for this time-triggered transaction:

Table 1. Load history purge attributes
Attribute Value
Base Transaction ID LOADHISTPRG
Base Document Type Load
Base Process Type Load Execution
Abstract Transaction No
APIs Called None
User Exits Called YFSBeforePurgeUE

Criteria parameters

The following are the criteria parameters for this transaction:

Table 2. Load history purge criteria parameters
Parameter Description
Action Required. Triggers the transaction. If left blank, it defaults to Get, the only valid value.
Number of Records To Buffer Optional. Number of records to retrieve and process at one time. If left blank or specified as 0 (zero), it defaults to 5000.
EnterpriseCode Optional. Enterprise for which the Load Purge needs to be run. If not passed, all enterprises are monitored.
Live Optional. Mode in which to run. Valid values are:
  • Y - Default value. Moves qualifying records from the regular tables listed under Tables Purged to the corresponding history tables.
  • N - Test mode. Determines the rows that are moved to history tables without actually moving them.
Purge Code Required. Cannot be modified. Used for internal calculations, such as determining retention days. Corresponds with the PurgeCode used in Business Rules Purge Criteria.
ColonyID Required in a sharded deployment where a table may exist in multiple schemas. Runs the agent for the colony.

Statistics tracked

The following statistics are tracked for this transaction:

Table 3. Load history purge statistics
Statistic Name Description
NumLoadHistoriesPurged Number of load histories purged.
NumLoadShipment
HistoriesPurged
Number of load shipment histories purged.

Pending job count

For this transaction, the pending job count is the number of records that can be purged from the YFS_Load_H table.

Events raised

None.

Tables purged

YFS_LOAD_H

YFS_LOAD_STOP_H

YFS_LOAD_SHIPMENT_CHARGE_H

YFS_LOAD_STATUS_AUDIT_H

YFS_SHIPMENT_CONTAINER_H

YFS_CONTAINER_ACTIVITY_H

YFS_LOADED_CONTAINER_H

YFS_LOAD_SHIPMENT_H

YFS_ADDITIONAL_DATE_H

YFS_LOAD_HOLD_TYPE_H

YFS_LOAD_HOLD_TYPE_LOG_H