83 lines
2.6 KiB
Markdown
83 lines
2.6 KiB
Markdown
# MARS-835-PREHOOK: Parallel Processing for DATA_EXPORTER
|
|
|
|
## Overview
|
|
Implements parallel partition processing for DATA_EXPORTER package using **DBMS_PARALLEL_EXECUTE** framework.
|
|
|
|
## Changes Summary
|
|
|
|
### ENV_MANAGER v3.1.0 → v3.2.0
|
|
- Added `CODE_INVALID_PARALLEL_DEGREE` (-20110) error code
|
|
- Added `CODE_PARALLEL_EXECUTION_FAILED` (-20111) error code
|
|
- Added corresponding message constants and exception declarations
|
|
|
|
### DATA_EXPORTER v2.2.0 → v2.3.0
|
|
- Added `pParallelDegree` parameter to `EXPORT_TABLE_DATA_BY_DATE` (default: 1, range: 1-16)
|
|
- Added `pParallelDegree` parameter to `EXPORT_TABLE_DATA_TO_CSV_BY_DATE` (default: 1, range: 1-16)
|
|
- Implemented `EXPORT_PARTITION_PARALLEL` callback procedure for DBMS_PARALLEL_EXECUTE
|
|
- Created global temporary table `A_PARALLEL_EXPORT_CHUNKS` for chunk management
|
|
- Sequential processing when `pParallelDegree = 1` (default - safest option)
|
|
- Parallel processing via DBMS_PARALLEL_EXECUTE when `pParallelDegree > 1`
|
|
- Automatic error detection and reporting through `USER_PARALLEL_EXECUTE_CHUNKS`
|
|
|
|
## Installation
|
|
|
|
### Prerequisites
|
|
- Oracle Database 23ai or higher (DBMS_PARALLEL_EXECUTE support)
|
|
- ADMIN privileges for table creation
|
|
- CT_MRDS schema for package deployment
|
|
|
|
### Installation Command
|
|
```powershell
|
|
cd .\MARS_Packages\REL01_POST_DEACTIVATION\MARS-835-PREHOOK
|
|
echo "YES" | sql "ADMIN/Cloudpass#34@ggmichalski_high" "@install_mars835_prehook.sql"
|
|
```
|
|
|
|
## Usage Examples
|
|
|
|
### Parallel Export (8 threads)
|
|
```sql
|
|
BEGIN
|
|
CT_MRDS.DATA_EXPORTER.EXPORT_TABLE_DATA_BY_DATE(
|
|
pSchemaName => 'OU_TOP',
|
|
pTableName => 'AGGREGATED_ALLOTMENT',
|
|
pKeyColumnName => 'A_WORKFLOW_HISTORY_KEY',
|
|
pBucketArea => 'ARCHIVE',
|
|
pFolderName => 'parallel_export',
|
|
pMinDate => DATE '2020-01-01',
|
|
pMaxDate => SYSDATE,
|
|
pParallelDegree => 8
|
|
);
|
|
END;
|
|
/
|
|
```
|
|
|
|
### Sequential Export
|
|
```sql
|
|
BEGIN
|
|
CT_MRDS.DATA_EXPORTER.EXPORT_TABLE_DATA_BY_DATE(
|
|
pSchemaName => 'OU_TOP',
|
|
pTableName => 'AGGREGATED_ALLOTMENT',
|
|
pKeyColumnName => 'A_WORKFLOW_HISTORY_KEY',
|
|
pBucketArea => 'DATA',
|
|
pFolderName => 'sequential_export',
|
|
pParallelDegree => 1 -- Sequential
|
|
);
|
|
END;
|
|
/
|
|
```
|
|
|
|
## Test Results
|
|
✅ Installation successful
|
|
✅ ENV_MANAGER v3.2.0 compiled
|
|
✅ DATA_EXPORTER v2.3.0 compiled
|
|
✅ Zero partition handling works correctly
|
|
✅ DBMS_PARALLEL_EXECUTE framework verified
|
|
|
|
## Rollback
|
|
```powershell
|
|
sql "ADMIN/Cloudpass#34@ggmichalski_high" "@rollback_mars835_prehook.sql"
|
|
```
|
|
|
|
## Author
|
|
Grzegorz Michalski - 2025-12-20
|