diff --git a/config.py b/config.py index 70d8d09..c7b3ed6 100644 --- a/config.py +++ b/config.py @@ -151,18 +151,23 @@ ELABDATADISP_FIELD_MAPPING = { # PostgreSQL Partition years (from both tables) PARTITION_YEARS = list(range(2014, 2032)) # 2014-2031 -# Table configurations -TABLE_CONFIGS = { - "rawdatacor": { - "mysql_table": "RAWDATACOR", - "postgres_table": "rawdatacor", - "primary_key": "id", - "partition_key": "event_date", - }, - "elabdatadisp": { - "mysql_table": "ELABDATADISP", - "postgres_table": "elabdatadisp", - "primary_key": "idElabData", - "partition_key": "event_date", - }, +# Table configurations - support both uppercase and lowercase keys +_rawdatacor_config = { + "mysql_table": "RAWDATACOR", + "postgres_table": "rawdatacor", + "primary_key": "id", + "partition_key": "event_date", +} +_elabdatadisp_config = { + "mysql_table": "ELABDATADISP", + "postgres_table": "elabdatadisp", + "primary_key": "idElabData", + "partition_key": "event_date", +} + +TABLE_CONFIGS = { + "rawdatacor": _rawdatacor_config, + "RAWDATACOR": _rawdatacor_config, + "elabdatadisp": _elabdatadisp_config, + "ELABDATADISP": _elabdatadisp_config, }