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)

Implementation Specs (157)

Detailed engineering and feature implementation specifications.
implementation-specs/specs/RedshiftFoundation/TASK2.2.md 2,339 bytes · Updated Oct 23, 2026 10:44 AM EDT
Raw File

TASK 2.2: Physically Create Internal Warehouse Structures

Summary

Create the initial runtime warehouse structures in the tenant Redshift database that define the phase-1 source-mirror warehouse contract.

This task now absorbs the physical creation of the phase-1 staging and curated source-mirror tables so the standard bootstrap produces a complete tenant template in one pass.

This task creates the physical source-mirror layers needed to define:

  • staging.<system>_<table>
  • curated.<system>_<table>

curated is a source-mirror runtime surface in phase 1. It is not yet a canonical monitor-facing contract.

Dependencies

  • TASK 2.1 (tenant database bootstrap workflow)

Files to Create

1. Internal warehouse DDL/bootstrap artifacts

Create the physical internal structures needed for:

  • source-mirror staging tables for supported systems
  • source-mirror curated tables for supported systems

These artifacts should be represented as explicit SQL files in Kds.Ai.Warehouse.

Files to Modify

2. Bootstrap workflow artifacts as needed

Extend the tenant bootstrap implementation so these internal structures are created as part of the standard tenant template.

Required Behavior

  • Create physical storage for source-mirror staging.<system>_<table> tables
  • Create physical storage for source-mirror curated.<system>_<table> tables
  • Preserve source table names and source prefixes in both schemas
  • Use kds, aloha, and labpos system prefixes in Redshift object names
  • Keep serving physically present but empty in phase 1

Acceptance Criteria

  • [x] Internal source-mirror staging structures are physically created
  • [x] Internal source-mirror curated structures are physically created
  • [x] Supported source systems are represented with prefixed Redshift object names
  • [x] The bootstrap process creates these structures repeatably
  • [x] curated structures define the phase-1 source-mirror runtime surface
  • [x] Solution builds without errors

Notes

  • This task is still foundation work.
  • Do not implement source ingestion, seed data loading, or ETL runtime logic here.
  • The physical source-mirror table creation that was originally split into TASK 3.1, TASK 3.2, and TASK 3.3 is implemented here so bootstrap remains one complete phase-1 template operation.