Refactor MARS-1005 scripts for OU_TOP legacy data export and rollback

- Updated SQL scripts to verify data integrity for 6 OU_TOP.LEGACY_* tables instead of 3 C2D MPEC tables.
- Modified rollback script to delete exported CSV files from ODS/TOP/ bucket paths.
- Enhanced verification script to check for remaining files and cloud bucket contents specific to MARS-1005.
- Adjusted install script to reflect changes in target tables and their corresponding paths in the ODS bucket.
- Updated README to include instructions for the new MARS-1005 installation and rollback processes.
This commit is contained in:
Grzegorz Michalski
2026-03-06 14:34:12 +01:00
parent 73e99b6e76
commit b81e524351
6 changed files with 423 additions and 343 deletions

View File

@@ -1,11 +1,11 @@
-- ===================================================================
-- MARS-1005 INSTALL SCRIPT: C2D MPEC Data Export to External Tables
-- MARS-1005 INSTALL SCRIPT: OU_TOP Historical Data Export to ODS Bucket
-- ===================================================================
-- Purpose: One-time bulk export of 3 C2D MPEC tables from OU_LEGACY_C2D schema
-- to OCI buckets (ODS bucket CSV format)
-- Uses DATA_EXPORTER v2.7.5 with pRegisterExport for file registration
-- Purpose: One-time bulk export of 6 OU_TOP LEGACY tables to OCI DATA bucket
-- (ODS bucket area, CSV format)
-- Uses DATA_EXPORTER EXPORT_TABLE_DATA with pRegisterExport for file tracking
-- Author: Grzegorz Michalski
-- Date: 2026-02-12
-- Date: 2026-03-06
-- Dynamic spool file generation (using SYS_CONTEXT - no DBA privileges required)
-- Log files are automatically created in log/ subdirectory
@@ -30,20 +30,23 @@ SET PAUSE OFF
-- ALTER SESSION SET CURRENT_SCHEMA = CT_MRDS;
PROMPT =========================================================================
PROMPT MARS-1005: C2D MPEC Data Export to External Tables (One-Time Migration)
PROMPT MARS-1005: OU_TOP Historical Data Export to ODS Bucket (One-Time Migration)
PROMPT =========================================================================
PROMPT
PROMPT This script will export 3 C2D MPEC tables to OCI buckets:
PROMPT This script will export 6 OU_TOP LEGACY tables to OCI DATA bucket:
PROMPT
PROMPT TARGET: ODS Bucket (CSV format):
PROMPT - MPEC_ADMIN
PROMPT - MPEC_CONTENT
PROMPT - MPEC_CONTENT_CRITERION
PROMPT TARGET: DATA Bucket / ODS area (CSV format):
PROMPT - OU_TOP.LEGACY_ALLOTMENT -> ODS/TOP/TOP_ALLOTMENT
PROMPT - OU_TOP.LEGACY_ALLOTMENT_MODIFICATION_HEADER -> ODS/TOP/TOP_ALLOTMENT_MODIFICATION_HEADER
PROMPT - OU_TOP.LEGACY_ALLOTMENT_MODIFICATION_ITEM -> ODS/TOP/TOP_ALLOTMENT_MODIFICATION_ITEM
PROMPT - OU_TOP.LEGACY_ANNOUNCEMENT -> ODS/TOP/TOP_ANNOUNCEMENT
PROMPT - OU_TOP.LEGACY_FBL_ITEM -> ODS/TOP/TOP_FULLBIDLIST_ITEM
PROMPT - OU_TOP.LEGACY_FULLBID_ARRAY_COMPILED -> ODS/TOP/TOP_FULLBID_ARRAY_COMPILED
PROMPT
PROMPT Key Features:
PROMPT - Files registered in A_SOURCE_FILE_RECEIVED for tracking
PROMPT - Template table column order matching (CT_ET_TEMPLATES.C2D_MPEC_*)
PROMPT - ODS/C2D bucket path structure
PROMPT - Files registered in A_SOURCE_FILE_RECEIVED with PROCESS_NAME = 'MARS-1005'
PROMPT - Template table column order matching (CT_ET_TEMPLATES.TOP_*)
PROMPT - ODS/TOP bucket path structure
PROMPT =========================================================================
-- Confirm installation with user