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/pos_order_items.md 4,438 bytes · Updated Oct 23, 2026 10:44 AM EDT
Raw File

curated.pos_order_items

Purpose

curated.pos_order_items is the shared business order-line fact in the warehouse.

It should answer the question: what exactly was in the basket, in what quantity, at what price, with what item status, and under which order?

Why this table matters

  • gives one row per business order item
  • links item behavior back to the shared order header through order_id
  • supports basket analytics, mix analysis, and future recommendation logic
  • exposes readable business fields such as item_name, unit_price, and item_status
  • keeps lineage needed for cross-source reconciliation through source_system and source_order_item_id

Grain

One row per business order item in the curated order model.

Column groups

  • Business properties describe the order line itself: product identity, quantity, price, item state, modifier context, and business time.
  • Technical and ETL properties describe warehouse lineage, surrogate keys, source reconciliation, tenant scoping, and ingestion metadata.

Business properties

ColumnTypeNullableBusiness MeaningNotes
order_idVARCHAR(50)NoBusiness-facing order identifier owning the line.Foreign-business key linking the line back to the shared order header.
item_idINTEGERNoSource or canonical item identifier.
item_nameVARCHAR(255)NoHuman-readable item name captured on the line.Snapshot of the item label used on the order line.
quantityINTEGERYesSold quantity for the line item.
unit_priceDECIMAL(10, 2)YesSelling price for one unit on the line.Unit-level price before line-level aggregation.
idINTEGERNoSource-native order line identifier.Native line identifier for reconciliation with source records.
size_nameVARCHAR(100)YesSize or variant label for the line item.
modifiersVARCHAR(65535)YesRaw or serialized modifier representation for the line.Preserves source-level modifier detail when a normalized representation is not available.
kds_delayINTEGERYesKitchen delay or prep hint attached to the line.
category_idVARCHAR(199)YesShared item category identifier.Canonical category identifier for cross-source product grouping.
category_nameVARCHAR(255)YesReadable category label.
item_statusVARCHAR(100)YesShared business status of the line such as active, voided, deleted, or cleared.Normalized line lifecycle status.
modifier_summaryVARCHAR(65535)YesReadable normalized summary of applied modifiers.Intended for analytics-friendly modifier reporting.
created_at_utcTIMESTAMPYesUTC timestamp representing line creation time or best available order-line time proxy.Preferred timestamp for cross-store and cross-timezone analysis.
business_dateDATEYesRestaurant business date used for reporting and ETL partitioning.May differ from the calendar date of created_at_utc.
currency_codeVARCHAR(10)YesCurrency of the monetary values.Required when curated data spans multiple currency contexts.

Technical and ETL properties

ColumnTypeNullableTechnical MeaningNotes
order_item_keyBIGINTYesWarehouse-generated stable surrogate key for the order line entity.Surrogate warehouse key for dimensional or fact-style joins.
source_systemVARCHAR(100)YesCanonical integration name used for lineage across source platforms.Identifies which operational platform produced the record.
source_order_item_idVARCHAR(199)YesOriginal source identifier kept for reconciliation and drill-through.Preserves the native source key even when curated identifiers are normalized.
tenant_keyBIGINTYesWarehouse surrogate key for tenant or brand scope.
tenant_nameVARCHAR(255)YesTenant or brand identifier injected by the ETL context.Human-readable tenant or brand lineage value.
_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.