Spensara Spensara Knowledge Base & Documentation Repository

Repository Docs & Knowledge Base

Consolidated Spensara documentation repository (722 Markdown & architecture documents in ../repository)
Built Word Documents (.docx): Spensara Overview (.docx) Capability Assessment (.docx) Brink POS Ingestion Analysis (.docx) The Borg Ingestion Architecture (.docx)

Warehouse Model (93)

Analytical data warehouse schemas, curated tables, and Redshift/Athena data models.
warehouse-model/docs/features/ETL/warehouse-data/curated-model/kitchen_orders.md 4,806 bytes · Updated Oct 23, 2026 10:44 AM EDT
Raw File

curated.kitchen_orders

Purpose

This table is the kitchen-facing order header surface used by monitors, APIs, and operational warehouse reads. Each row represents one kitchen order and carries the high-level facts needed to analyze volume, throughput, and order mix.

It is the parent surface for curated.kitchen_order_items and the primary entry point for kitchen order trend analysis.

Schema contract

The deployed SQL under backend/Kds.Ai.Warehouse/Sql/Bootstrap/Tenant/Curated/ is the source of truth for the current column names, types, and nullability.

Column groups

  • Business properties describe the business entity, event, fact, or reference record represented by the table.
  • Technical and ETL properties describe warehouse lineage, surrogate keys, source reconciliation, tenant scoping, slowly changing dimension controls, and ingestion metadata.

Business properties

ColumnTypeNullableBusiness MeaningNotes
guidVARCHAR(36)NoUnique identifier of the kitchen order row.
store_guidVARCHAR(36)NoTenant store or location identifier for the order.
destinationVARCHAR(255)YesKitchen station, queue, or operational destination label.
is_prioritySMALLINTNoPriority flag used by kitchen workflow and anomaly detection.
items_countINTEGERNoNumber of items attached to the order.
order_typeVARCHAR(199)YesBusiness order type such as dine-in, takeout, or delivery.
pos_terminalVARCHAR(199)YesPOS terminal that created or owns the order.
preparation_timeINTEGERYesTotal order preparation duration.
doneSMALLINTNoCompletion flag indicating whether the order is finished.
create_timeINTEGERNoCanonical creation timestamp used for time-window analysis.
is_deletedSMALLINTNoSoft-delete flag for downstream filtering.
external_idVARCHAR(199)NoExternal source identifier for the order.
guest_tableVARCHAR(199)YesDining table label or guest location marker.
update_timeINTEGERNoCanonical last update timestamp for the order.
phoneVARCHAR(65535)YesCustomer phone captured on the order when available.
create_local_timeINTEGERYesLocal-time mirror of order creation time.
customer_guidVARCHAR(36)YesReference to a customer entity when one exists.
smart_order_start_timeINTEGERYesLegacy smart-order scheduling or workflow start timestamp.
order_messagesVARCHAR(255)NoShort order-level message or instructions summary.
customer_nameVARCHAR(60)YesCustomer-facing name attached to the order.
seatINTEGERYesSeat number within a party when tracked.
order_statusINTEGERYesNumeric order status code from the source contract.
store_nameVARCHAR(255)YesReadable store name associated with the kitchen order.
pos_terminal_nameVARCHAR(255)YesReadable terminal or channel name that created the order.
order_status_nameVARCHAR(100)YesReadable business label for the order status.
service_channelVARCHAR(100)YesStandardized business channel such as dine-in, takeout, drive-thru, or delivery.
business_dateDATEYesBusiness date associated with the kitchen order in curated logic.
create_time_utcTIMESTAMPYesUTC timestamp when the kitchen order was created in canonical warehouse time.
timezone_nameVARCHAR(100)YesCanonical IANA or business-standard time zone name used to interpret local kitchen timestamps.

Technical and ETL properties

ColumnTypeNullableTechnical MeaningNotes
kitchen_order_keyBIGINTYesStable warehouse key for the kitchen order entity.
source_systemVARCHAR(100)YesCanonical name of the source platform that produced the kitchen order row.
source_order_idVARCHAR(199)YesOriginal kitchen or POS order identifier from the source platform.
tenant_keyBIGINTYesStable warehouse key for the tenant, brand, or client that owns the kitchen order.
tenant_nameVARCHAR(255)YesReadable tenant, brand, or client name associated with the kitchen order.
_etl_batch_idVARCHAR(256)YesETL batch lineage identifier.
_etl_source_typeVARCHAR(100)YesSource adapter type used by ETL.
_etl_ingested_atTIMESTAMPNoWarehouse ingestion timestamp for the curated row.Required ingestion audit timestamp.