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

curated.customers

Purpose

This table stores customer master and contact details in the current curated contract. It provides a reusable warehouse surface for customer lookups, contact enrichment, and linking operational records back to a person or account.

It is a slowly changing business entity compared with order and transaction tables, even if the current contract still carries some legacy KDS-style metadata fields.

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)NoCanonical customer identifier in the curated model.
external_idVARCHAR(199)NoSource-system customer identifier.
nameVARCHAR(65535)YesFull customer name.
phoneVARCHAR(65535)YesPrimary phone number.
phone2VARCHAR(65535)YesSecondary phone number.
addressVARCHAR(65535)YesPrimary street address.
cityVARCHAR(65535)YesCustomer city.
stateVARCHAR(65535)YesCustomer state or region.
zipVARCHAR(65535)YesPostal or ZIP code.
countryVARCHAR(65535)YesCountry name or code.
emailVARCHAR(65535)YesPrimary email address.
store_guidVARCHAR(36)NoStore or tenant identifier that owns the customer record.
create_timeINTEGERNoCanonical creation timestamp for the customer record.
is_deletedSMALLINTNoSoft-delete flag for downstream filtering.
customer_statusVARCHAR(100)YesBusiness-friendly lifecycle or activity status of the customer.
home_store_nameVARCHAR(255)YesReadable name of the primary store associated with the customer.
created_at_utcTIMESTAMPYesUTC timestamp when the customer record was created in the curated model.
updated_at_utcTIMESTAMPYesUTC timestamp when the customer record was last updated in the curated model.

Technical and ETL properties

ColumnTypeNullableTechnical MeaningNotes
customer_keyBIGINTYesStable warehouse key for the customer entity.
source_systemVARCHAR(100)YesCanonical name of the source platform that produced the customer record.
source_customer_idVARCHAR(199)YesOriginal customer identifier from the source platform.
tenant_keyBIGINTYesStable warehouse key for the tenant, brand, or client that owns the customer.
tenant_nameVARCHAR(255)YesReadable tenant, brand, or client name associated with the customer.
is_currentBOOLEANYesCanonical flag indicating whether the row is the current customer version.
effective_from_utcTIMESTAMPYesUTC timestamp from which the current customer version is valid.
effective_to_utcTIMESTAMPYesUTC timestamp until which the current customer version is valid.
_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.