Daily Purge of Foundation Data (daily_purge_job)
Module Name |
daily_purge_job |
Description |
Daily Purge of Foundation Data |
Functional Areas |
Administration |
Module Type |
Admin - Adhoc |
Module Technology |
Background Processing |
Catalog ID |
N/A |
Wrapper Script |
b8dwrap.ksh |
Design Overview
This background job is composed of two steps processing. It will have a threading assignment and a business logic processing.
When you 'delete' a record in the RMFCSS user interface, information is generally not immediately deleted at the database level; instead, data is marked as being in deleted status and also inserted into the daily purge table.
A thread assignment program will filter eligible records from daily purge table wherein all entities ready for purging aside/except from Item-Location records. These records are chunked and Thread ID is assigned for each. They will be stored temporarily in a staging table.
The Business logic program will process all records from the staging table. Using bulk processing, this program will delete specific Foundation Data entities from the respective RMFCS tables. Complex referential integrity relationships determine whether data can actually be deleted from the database (for example, a store cannot be deleted if any transactions related to the store are still on current transaction tables). This program checks these complex rules. If the deletion request passes the rules, this job will continues to delete the data. If it is not able to delete the data, it writes a record to the daily purge error log table for further investigation. This program will continue to attempt to delete marked data until all references have been purged from the system and the deletion of the foundation data entity finally succeeds. It will free up and clean the staging table afterwards. There is a STOP ON NEXT feature in bulk processing (through a loop) where Administrators can stop this batch with a flip of this indicator.
Key Tables Affected
Table 2-1 Key Tables Affected
Table | Select | Insert | Update | Delete |
---|---|---|---|---|
RMS_BATCH_STATUS |
Yes |
No |
No |
No |
B8D_PROCESS_CONFIG |
Yes |
No |
No |
No |
JOB_AUDIT_LOGS |
No |
Yes |
No |
No |
B8D_DAILY_PURGE_STG |
Yes |
No |
No |
No |
DAILY_PURGE |
Yes |
No |
No |
Yes |
DAILY_PURGE_ERROR_LOG |
Yes |
Yes |
No |
Yes |
LOC_LIST_DETAIL |
No |
No |
No |
Yes |
MONTH_DATA_BUDGET |
Yes |
No |
No |
Yes |
HALF_DATA_BUDGET |
Yes |
No |
No |
Yes |
VAT_DEPS |
Yes |
No |
No |
Yes |
SKULIST_CRITERIA |
Yes |
No |
No |
Yes |
DOMAIN_DEPT |
Yes |
No |
No |
Yes |
FORECAST_REBUILD |
Yes |
No |
No |
Yes |
SUP_DATA |
Yes |
No |
No |
Yes |
DEPT_SALES_HIST |
Yes |
No |
No |
Yes |
DEPT_SALES_FORECAST |
Yes |
No |
No |
Yes |
DEAL_ITEMLOC |
Yes |
No |
No |
Yes |
DEPS |
Yes |
No |
No |
Yes |
STOCK_LEDGER_INSERTS |
Yes |
No |
No |
Yes |
STAKE_SCHEDULE |
Yes |
No |
No |
Yes |
DEPT_CHRG_DETAIL |
Yes |
No |
No |
Yes |
WH_DEPT |
Yes |
No |
No |
Yes |
DEPT_CHRG_HEAD |
Yes |
No |
No |
Yes |
SUP_BRACKET_COST |
Yes |
No |
No |
Yes |
SUP_REPL_DAY |
Yes |
No |
No |
Yes |
SUP_INV_MGMT |
Yes |
No |
No |
Yes |
FILTER_GROUP_MERCH |
Yes |
No |
No |
Yes |
IB_RESULTS |
Yes |
No |
No |
Yes |
WEEK_DATA |
Yes |
No |
No |
Yes |
DAILY_DATA |
Yes |
No |
No |
Yes |
MONTH_DATA |
Yes |
No |
No |
Yes |
TRAN_DATA_HISTORY |
Yes |
No |
No |
Yes |
HALF_DATA |
Yes |
No |
No |
Yes |
PARTNER |
Yes |
No |
No |
Yes |
SHIPMENT |
Yes |
No |
No |
Yes |
COST_ZONE_GROUP_LOC |
Yes |
No |
No |
Yes |
COST_ZONE |
Yes |
No |
No |
Yes |
COST_ZONE_GROUP |
Yes |
No |
No |
Yes |
UDA_ITEM_DEFAULTS |
Yes |
No |
No |
Yes |
DOMAIN_CLASS |
Yes |
No |
No |
Yes |
CLASS_SALES_HIST |
Yes |
No |
No |
Yes |
CLASS_SALES_FORECAST |
Yes |
No |
No |
Yes |
CLASS |
Yes |
No |
No |
Yes |
DOMAIN_SUBCLASS |
Yes |
No |
No |
Yes |
OTB |
Yes |
No |
No |
Yes |
DIFF_RATIO_DETAIL |
Yes |
No |
No |
Yes |
DIFF_RATIO_HEAD |
Yes |
No |
No |
Yes |
SUBCLASS_SALES_HIST |
Yes |
No |
No |
Yes |
SUBCLASS_SALES_FORECAST |
Yes |
No |
No |
Yes |
SUBCLASS |
Yes |
No |
No |
Yes |
MERCH_HIER_DEFAULT |
Yes |
No |
No |
Yes |
WH |
Yes |
No |
No |
Yes |
WH_ADD |
Yes |
No |
No |
Yes |
STORE_SHIP_DATE |
Yes |
No |
No |
Yes |
LOC_TRAITS_MATRIX |
Yes |
No |
No |
Yes |
COST_ZONE_GROUP_LOC |
Yes |
No |
No |
Yes |
ITEM_EXP_DETAIL |
Yes |
No |
No |
Yes |
ITEM_EXP_HEAD |
Yes |
No |
No |
Yes |
EXP_PROF_DETAIL |
Yes |
No |
No |
Yes |
EXP_PROF_HEAD |
Yes |
No |
No |
Yes |
STORE_GRADE_STORE |
Yes |
No |
No |
Yes |
DAILY_SALES_DISCOUNT |
Yes |
No |
No |
Yes |
LOAD_ERR |
Yes |
No |
No |
Yes |
STORE |
Yes |
No |
No |
Yes |
EDI_SALES_DAILY |
Yes |
No |
No |
Yes |
COMP_STORE_LINK |
Yes |
No |
No |
Yes |
SEC_GROUP_LOC_MATRIX |
Yes |
No |
No |
Yes |
LOC_CLSF_HEAD |
Yes |
No |
No |
Yes |
LOC_CLSF_DETAIL |
Yes |
No |
No |
Yes |
SOURCE_DLVRY_SCHED |
Yes |
No |
No |
Yes |
SOURCE_DLVRY_SCHED_DAYS |
Yes |
No |
No |
Yes |
SOURCE_DLVRY_SCHED_EXC |
Yes |
No |
No |
Yes |
COMPANY_CLOSED_EXCEP |
Yes |
No |
No |
Yes |
LOCATION_CLOSED |
Yes |
No |
No |
Yes |
POS_STORE |
Yes |
No |
No |
Yes |
STORE_HIERARCHY |
Yes |
No |
No |
Yes |
ADDR |
Yes |
No |
No |
Yes |
TIF_EXPLODE |
Yes |
No |
No |
Yes |
WALK_THROUGH_STORE |
Yes |
No |
No |
Yes |
SKULIST_DETAIL |
Yes |
No |
No |
Yes |
INV_STATUS_QTY |
Yes |
No |
No |
Yes |
REPL_ATTR_UPDATE_LOC |
Yes |
No |
No |
Yes |
REPL_ATTR_UPDATE_HEAD |
Yes |
No |
No |
Yes |
REPL_ATTR_UPDATE_ITEM |
Yes |
No |
No |
Yes |
COST_SUSP_SUP_DETAIL |
Yes |
No |
No |
Yes |
ITEM_HTS_ASSESS |
Yes |
No |
No |
Yes |
ITEM_HTS |
Yes |
No |
No |
Yes |
REQ_DOC |
Yes |
No |
No |
Yes |
ITEM_IMPORT_ATTR |
Yes |
No |
No |
Yes |
TIMELINE |
Yes |
No |
No |
Yes |
COND_TARIFF_TREATMENT |
Yes |
No |
No |
Yes |
ITEM_IMAGE |
Yes |
No |
No |
Yes |
ITEM_SUPP_UOM |
Yes |
No |
No |
Yes |
DEAL_SKU_TEMP |
Yes |
No |
No |
Yes |
DEAL_DETAIL |
Yes |
No |
No |
Yes |
ITEM_SUPP_COUNTRY |
Yes |
No |
No |
Yes |
ITEM_SUPP_COUNTRY_DIM |
Yes |
No |
No |
Yes |
RECLASS_ITEM |
Yes |
No |
No |
Yes |
SUP_AVAIL |
Yes |
No |
No |
Yes |
ITEM_SUPPLIER |
Yes |
No |
No |
Yes |
ITEM_MASTER |
Yes |
No |
No |
Yes |
PACK_TMPL_DETAIL |
Yes |
No |
No |
Yes |
SUPS_PACK_TMPL_DESC |
Yes |
No |
No |
Yes |
PACK_TMPL_HEAD |
Yes |
No |
No |
Yes |
UDA_ITEM_LOV |
Yes |
No |
No |
Yes |
UDA_ITEM_DATE |
Yes |
No |
No |
Yes |
UDA_ITEM_FF |
Yes |
No |
No |
Yes |
ITEM_SEASONS |
Yes |
No |
No |
Yes |
ITEM_TICKET |
Yes |
No |
No |
Yes |
COMP_SHOP_LIST |
Yes |
No |
Yes |
Yes |
TICKET_REQUEST |
Yes |
No |
No |
Yes |
PRICE_HIST |
Yes |
Yes |
No |
Yes |
PACKITEM_BREAKOUT |
Yes |
No |
No |
Yes |
PACKITEM |
Yes |
No |
No |
Yes |
POS_MERCH_CRITERIA |
Yes |
No |
No |
Yes |
ITEM_CHRG_HEAD |
Yes |
No |
No |
Yes |
ITEM_CHRG_DETAIL |
Yes |
No |
No |
Yes |
RECLASS_COST_CHG_QUEUE |
Yes |
No |
No |
Yes |
ITEM_PUB_INFO |
Yes |
No |
No |
Yes |
ITEM_MFQUEUE |
Yes |
No |
No |
Yes |
ITEM_XFORM_HEAD |
Yes |
No |
No |
Yes |
ITEM_XFORM_DETAIL |
Yes |
No |
No |
Yes |
DEAL_ITEM_LOC_EXPLODE |
Yes |
No |
No |
Yes |
ITEM_APPROVAL_ERROR |
Yes |
No |
No |
Yes |