Skip to Content
ProcessesTasksChainsGuestlineClean Guestline Task

CleanGuestlineTask

The CleanGuestlineTask converts Guestline raw models into the standard Clean* models used across our ETL framework. The task is Queensway-specific (Guestline chain) and contains bespoke mapping logic and additional fields used by Queensway.

Overview

This task:

  • Reads RawRoompicksModel and RawPersonprofilesModel as inputs
  • Standardizes reservation, guest, and room fields according to the shared schema
  • Adds Queensway-specific fields (queensway_exclude_from_mailings, queensway_exclude_from_thirdparty_mailings)
  • Creates guest_id UUID mapping (ensures a one-to-one mapping between OG IDs and internal UUIDs)
  • Explodes ratelines to produce daily room revenue records
  • Performs tie-breaking logic for duplicate reservations using status priority and last edited timestamp

Flow Diagram

Requires

  • RawRoompicksModel
  • RawPersonprofilesModel

Provides

  • CleanGuestModel
  • CleanReservationModel
  • CleanRoomModel

Notable Transformations

  • Status mapping to standard codes (CHKOchecked_out, CANcancelled, etc.)
  • Aggregate ratelines and evenly spread revenue across stay dates
  • Generate res_id and guest_id UUIDs where missing
  • Map property IDs to property names using the JobContext lookup
  • Standardize guest fields (names, address, email, phone) and run cleaning helpers for country, email, and phone

Best Practices

  • Use sync_dates to limit data processed during development
  • Use profileref fallback logic when guest profile lookups are missing
  • Monitor checkpoint/repartition settings when running at scale

Downstream Tasks

  • ProcessingTask — depends on the cleaned models as inputs
Last updated on