CMTPFixTask — Developer Reference
Developer reference for CMTPFixTask, an Opera chain-specific task created to mitigate CTMP cancelled booking inconsistencies for Cheval_Maison__The_Palm_Dubai.
Constructor Parameters
| Parameter | Type | Description |
|---|---|---|
name | Optional[str] | Optional task name |
job_context | JobContext | Job context with Spark, catalog and config |
Provides / Requires
requires()—[ProcessedReservationModel, ProcessedRoomModel]provides()—[ProcessedReservationModel, ProcessedRoomModel]
Behavior
The task applies several fixes for a hard-coded target property and a static list of res_id_og:
- Set
statustochecked_outfor the affected reservations. - Truncate the
check_out_dateto2025-03-25for reservations that span that date. - Remove or truncate room-level stay rows beyond the cutoff date.
- Convert GBP monetary fields to AED using a hard-coded multiplier (4.6) by multiplying
room_stay_date_rate_net,room_stay_date_fnb_net, androom_stay_date_other_net.
Example Usage
from etl_lib.tasks.chains.opera.CMTPFixTask import CMTPFixTask
cmtp = CMTPFixTask(job_context=job_context)
cmtp.run()Implementation Notes
- The list of
res_id_ogis hard-coded; maintainers should verify the IDs before updating. - The currency conversion multiplier is static; consider making it configurable if exchange rates vary.
Back to process documentation: [/processes/tasks/chains/opera/cmtp-fix-task](/processes/tasks/chains/opera/cmtp-fix-task)
Last updated on