GuestLoyaltyReportTask — Developer Reference
Developer examples and implementation notes for GuestLoyaltyReportTask.
Example Usage
from etl_lib.tasks.reports.GuestLoyaltyReportTask import GuestLoyaltyReportTask
task = GuestLoyaltyReportTask(job_context=job_context, database_sink=sink)
task.run()Implementation
# Implementation details are developer-centric and describe how to aggregate guest loyalty metrics to a report-friendly format.Guest flag values
The task writes guest_flag with one of the following values:
GUEST_NO_BOOKINGGUEST_BOOKING_NO_STAYGUEST_BOOKING_LAST_365_DAYS
Writing and deduplication
The task deduplicates on guest_cluster_id and removes internal id columns (guest_id_og, guest_id) prior to writing. When write_to_catalog=True the task writes the result to a curated guest_loyalty table via DatabaseSink.
Back to process documentation: /processes/tasks/reports/guest-loyalty-report-task
Last updated on