Skip to main content

Documentation Index

Fetch the complete documentation index at: https://revrebel-sync-metrics-library.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Database Column Naming Standards

Metrics Library & Analytics Warehouse

This document defines the canonical naming system used across the REVREBEL Metrics Library and analytics warehouse. The objective is consistency — not just in naming, but in how data is interpreted across dashboards, pipelines, models, reporting layers, automation workflows, and operational analysis. The warehouse is designed as a durable semantic layer where analysts, systems, and documentation can infer meaning directly from a field name without needing to inspect every upstream source table manually. Clean naming is not cosmetic, it is operational infrastructure.

Core Naming Standard

All database columns use lowercase snake_case. Column names follow this structure:
{metric_or_entity}_{usage_or_context}_{period_or_comparison}_{numeric_window_or_sequence}
The structure prioritizes:
  1. Metric or entity first
  2. Context or usage second
  3. Comparison or reporting period third
  4. Numeric windows or sequence identifiers last
This ordering keeps related metric families grouped together logically and alphabetically across warehouse schemas.

Naming Philosophy

The warehouse naming system is designed around semantic predictability. A field name should communicate:
  • what the metric represents,
  • how it is used,
  • what reporting context applies,
  • and whether a comparison, ranking, or rolling window exists.
The naming structure intentionally favors consistency over source-system terminology. Hospitality systems rarely agree on naming conventions. The warehouse does.

Core Naming Examples

Current VariantWarehouse StandardReason
rooms_budgetrms_bgtMetric first using approved abbreviations.
available_rooms_lyavailable_rms_lyStandardized room inventory naming.
rev_ly_actualrev_lyComparison context already defines the metric.
rooms_ly_actualrms_lyConcise prior-year structure.
rev_ly_actual_change_30_dayrev_chg_ly_030Standardized ordering and rolling-window formatting.
compset_revcs_revStandardized competitive-set prefix.
compset_occcs_occStandardized competitive-set prefix.
adr_index_pct_chg_pyadr_index_pct_chg_lyWarehouse standard uses ly.

Standard Formatting Rules

Lowercase Snake Case

All fields use:
  • lowercase letters
  • underscores
  • numeric suffixes where applicable

Preferred

property_code
arrival_date
roomtype_code
revpar_rank

Avoid

PropertyCode
ArrivalDate
roomTypeCode
RevPAR_Rank
segment_code_Map

Approved Metric Abbreviations

The warehouse standard consolidates recurring business concepts into a single approved naming structure.
ConceptStandard
Roomsrms
Available Roomsavailable_rms
Revenuerev
Occupancyocc
Budgetbgt
Forecastfct
Actualact
Last Yearly
Current Yearcy
Same Time Last Yearstly
Same Time Two Years Agost2y
Year Over Yearyoy
Percentagepct
Changechg
Percentage Changepct_chg
Competitive Setcs
Cancellationcx
No Showns
Reservationsrsvn
This standard removes synonym drift across operational systems, vendor exports, reporting tools, and manually built datasets.

Metric Ordering Logic

Metric First

Metric names begin with the measure or business entity being described.

Preferred

rms_bgt
rev_bgt
rms_fct
rev_fct
rms_act
rev_act
rms_pace_stly

Avoid

rooms_budget
rev_budget
budget_rooms
actualroomrevenue

Comparison & Period Suffixes

Reporting context appears after the metric.

Preferred

adr_ly
adr_cy
adr_stly
revpar_ly
rms_bgt_ly
rms_pace_stly

Avoid

ly_adr
prior_year_adr
stly_rms_pace
This keeps related metric families grouped together naturally during schema inspection and downstream modeling.

Numeric Window Standards

Rolling windows and sequence identifiers always appear last while numeric windows use three-digit formatting for predictable sorting behavior.

Preferred

rev_chg_ly_030
rms_chg_ly_030
adr_chg_ly_030
revpar_pct_chg_ly_090

Avoid

rev_chg_30_day_ly
rev_30_day_chg_ly

Competitive Set Standards

Competitive-set metrics use the cs_ prefix.

Standard

cs_adr
cs_occ
cs_rev
cs_revpar
cs_rms
cs_adr_yoy
The warehouse standard treats competitive benchmarking as a first-class reporting layer, not an exception case.

Revenue Naming Standards

Revenue defaults to room revenue unless another revenue category is explicitly prefixed.
Revenue TypeStandard
Room Revenuerev
Food & Beverage Revenuefb_rev
Other Revenueother_rev
No Show Revenuens_rev
Cancellation Revenuecx_rev
Total Revenuetotal_rev
This keeps operational reporting concise while preserving semantic clarity for non-room revenue categories.

Date Naming Standards

Date fields describe business meaning rather than storage type. The warehouse standard daily grain field is:
date
ConceptStandard
Daily Reporting Graindate
Booking Datebook_date
Arrival Datearrival_date
Departure Datedeparture_date
Inserted Dateinsert_date
Updated Dateupdated_date
Snapshot Datesnap_date
The goal is immediate interpretability during reporting, transformation, and operational analysis.

Identifier Standards

The warehouse uses standardized identifiers across all operational systems.
ConceptStandard
Universal Reservation Identifiersource_id
Property Identifierproperty_code
STR / CoStar Identifierstr_id
Rate Coderate_code
Room Type Coderoomtype_code
Segment Codesegment_code
Source Codesource_code
This structure normalizes identifier inconsistencies across PMS, CRS, booking engine, OTA, and third-party exports.

Name & Code Pair Standards

Where a business concept contains both a readable label and a system identifier, the distinction remains explicit.
ConceptName FieldCode Field
Rateraterate_code
Sourcesourcesource_code
Channelchannelchannel_code
Segmentsegmentsegment_code
Room Typeroomtyperoomtype_code
Propertyproperty_nameproperty_code

Source Mapping Standards

Standardized warehouse values may preserve source-system references when traceability or reconciliation is required. Mapping fields use:
{domain}_map
{domain}_code_map
Examples:
segment_map
segment_code_map
rate_map
rate_code_map
source_map
source_code_map
The warehouse prioritizes standardized operational reporting while preserving source-level traceability where necessary.

Core Metric Dictionary

StandardDefinition
rmsRoom count / room production metric
available_rmsAvailable room inventory
revRoom revenue
occOccupancy
adrAverage Daily Rate
revparRevenue Per Available Room
bgtBudget
fctForecast
actActual
lyLast year / prior year
cyCurrent year
stlySame time last year
st2ySame time two years ago
yoyYear-over-year
pctPercentage
chgChange / variance
pct_chgPercentage change
rankRanking metric
csCompetitive set
cxCancellation
nsNo show
ntsNights
rsvnReservations

Pattern Library

Budget / Forecast / Actual

{metric}_{bgt|fct|act}
{metric}_{bgt|fct|act}_{period}
Examples:
rms_bgt
rev_bgt
rms_fct
rev_fct
rms_act
rev_act

Pace Metrics

{metric}_pace_{period}
Examples:
rms_pace_stly
rev_pace_stly
adr_pace_stly
revpar_pace_stly

Ranking Metrics

{metric}_rank
{metric}_rank_{period}
cs_{metric}_rank
Examples:
adr_rank
revpar_rank
cs_adr_rank

Change Metrics

{metric}_chg
{metric}_pct_chg
{metric}_chg_{period}
{metric}_pct_chg_{period}
Examples:
occ_chg
adr_chg
revpar_chg
available_rms_pct_chg_ly
adr_index_pct_chg_ly
rev_chg_ly_030

Required Common Columns

ColumnPurpose
property_codeProperty-level reporting alignment
dateDaily reporting grain
snap_dateSnapshot reporting context
source_idReservation / source-system traceability
insert_dateData ingestion timestamp
updated_dateRecord update timestamp
These fields establish baseline reporting consistency across fact, dimension, snapshot, and reporting layers.

Warehouse Philosophy

The warehouse naming standard exists to create a reporting environment where:
  • metrics group together logically,
  • schemas remain predictable,
  • dashboards remain stable,
  • documentation stays aligned,
  • and automation workflows can infer semantic meaning directly from structure.
The objective is not shorter column names., the objective is operational clarity at scale.