fix: Support ELABDATADISP in fetch_rows_ordered_for_consolidation()

The method was restricted to only RAWDATACOR, but the consolidation logic
works for both tables. Updated the check to allow both:
- RAWDATACOR
- ELABDATADISP

The keyset pagination (id-based WHERE clause) works identically for both
tables, and consolidation happens in Python for both.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-25 19:02:00 +01:00
parent 5045c8bd86
commit e75cf4c545

View File

@@ -231,15 +231,15 @@ class MySQLConnector:
Consolidation happens within each batch in Python. Consolidation happens within each batch in Python.
Args: Args:
table: Table name (must be 'RAWDATACOR') table: Table name ('RAWDATACOR' or 'ELABDATADISP')
start_id: Resume from this ID (fetch id > start_id). If None, starts from beginning start_id: Resume from this ID (fetch id > start_id). If None, starts from beginning
batch_size: Number of rows per batch (uses config default if None) batch_size: Number of rows per batch (uses config default if None)
Yields: Yields:
Batches of row dictionaries Batches of row dictionaries
""" """
if table != "RAWDATACOR": if table not in ("RAWDATACOR", "ELABDATADISP"):
raise ValueError("Consolidation ordering only supported for RAWDATACOR") raise ValueError(f"Consolidation ordering only supported for RAWDATACOR and ELABDATADISP, got {table}")
if batch_size is None: if batch_size is None:
batch_size = self.settings.migration.batch_size batch_size = self.settings.migration.batch_size