Skip to Content
DevelopmentReferenceTasksChainsOperaCMTPFixTask — Developer Reference

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

ParameterTypeDescription
nameOptional[str]Optional task name
job_contextJobContextJob 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 status to checked_out for the affected reservations.
  • Truncate the check_out_date to 2025-03-25 for 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, and room_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_og is 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