Skip to Content
ProcessesTasksProcessingReservationMetricsTask

ReservationMetricsTask

The ReservationMetricsTask calculates key time-based metrics for reservations including booking window, cancellation window, and stay nights.

Overview

This task computes temporal metrics that are essential for:

  • Analyzing booking behavior patterns
  • Understanding cancellation trends
  • Calculating length of stay distributions
  • Measuring lead times

Flow Diagram

Calculated Metrics

Metric Calculations

Models

Requires

  • CleanReservationModel - Cleaned reservation data

Provides

  • ProcessedReservationModel - Reservation data with calculated metrics

Incremental Mode

  • ReservationMetricsTask supports incremental mode:
    • In incremental mode, it computes metrics only for new/changed reservations and writes them to ProcessedAddedReservationModel.
    • During merging, new reservations are unioned with existing processed reservations and deduplicated by res_id using the latest last_modified_timestamp.
Last updated on