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/BrinkPosOrdersFirstEtlJob/TASK6.2.md 2,371 bytes · Updated Oct 23, 2026 10:44 AM EDT
Raw File

TASK 6.2: Freeze Curated Target Dependency Matrix And V1 Field Behavior

Summary

Freeze the fixed v1 curated target catalog for curated.pos_orders and curated.pos_order_items, including their staging dependency matrix and the explicit field-behavior rules required when non-GetOrders enrichment stays deferred.

This subtask is the core semantic-shaping step for the first staging -> curated slice.

Dependencies

  • TASK 6.1 - staging-to-curated orchestration and upstream load-to-staging batch resolution

Files to Create

1. Curated target catalog

Create or finalize the fixed v1 curated target catalog for the narrowed order-centric slice.

Required catalog details:

  • TargetName
  • required staging tables
  • optional staging tables when used only for fallback behavior
  • SQL template identity
  • field-behavior notes for nullable or deferred-enrichment columns

Files to Modify

2. Curated dependency and mapping definitions

Modify or finalize the dependency and mapping definitions so they align with:

  • TASK0.md
  • existing curated bootstrap SQL
  • the narrowed GetOrders staging inventory from TASK4.md and TASK5.md

Required Behavior

  • curated.pos_orders and curated.pos_order_items are the only curated targets for this task
  • dependency rules are explicit for both targets
  • target naming stays aligned with the existing curated bootstrap SQL
  • fields that depend on deferred sources are documented as nullable or fallback-derived in v1
  • the dependency matrix must not silently require non-GetOrders endpoints

Testing

Unit tests

Add unit tests for:

  • curated target catalog correctness for both v1 targets
  • dependency matrix correctness for each target
  • deferred-enrichment field behavior, especially payment_method
  • rejection of unsupported curated targets

Acceptance Criteria

  • [x] Fixed v1 curated target catalog exists for curated.pos_orders and curated.pos_order_items
  • [x] Each target has an explicit staging dependency matrix
  • [x] Deferred-enrichment field behavior is explicit and testable
  • [x] Unsupported curated targets are rejected explicitly
  • [x] Unit tests cover target catalog and field-behavior rules

Notes

  • Keep this subtask focused on target semantics and dependency freezing.
  • Do not execute curated SQL here; that belongs to TASK 6.3.