BookingRoomsReportTask — Developer Reference
Developer examples and code for BookingRoomsReportTask.
Example Usage
from etl_lib.tasks.reports.BookingRoomsReportTask import BookingRoomsReportTask
task = BookingRoomsReportTask(
job_context=job_context,
database_sink=sink
)
task.run()
## Incremental example
```python
task = BookingRoomsReportTask(job_context=job_context, database_sink=sink, is_incremental=True, write_to_catalog=True)
task.run()When run in incremental mode the task regenerates booking rows for reservations affected by ProcessedAddedRoomModel and upserts them to the chain booking_rooms table using keys: chain_id, property_id, res_id.
Mandatory columns
Before aggregation this task ensures the presence of the following rooms columns and will create them with DoubleType if missing:
room_stay_date_rate_netroom_stay_date_fnb_netroom_stay_date_other_netroom_stay_date_total_netroom_stay_date_listing_rate_netroom_stay_date_listing_rate_gross
## Implementation Notes
- Aggregates daily-level rows into booking-level rows
- Sums revenue, guest counts, and other metrics per `res_id`
> Back to process documentation: [/processes/tasks/reports/booking-rooms-report-task](/processes/tasks/reports/booking-rooms-report-task)Last updated on