Repository navigation
Open
Milestone
Description
Parent #1449; depends on approved template #1448. Floe 1.1.
Context
One workbook/domain, two data sheets Tables and Columns plus instructional Guide, no Rules sheet. Use existing optional fastexcel (xlsx extra); src/floe/read/xlsx.py is an ingestion data reader, not the contract-importer parser.
Scope
- Implement read-only workbook parsing into typed in-memory
domain, table records, ordered column records, and Excel cell provenance. - Parse the v5 English headers exactly as in docs(business-contract): English three-tab domain Excel template, keys before quality #1448, including the three visual groups (group rows must not be mistaken for table headers).
- Parse X/blank flags:
primary_key,unique,not_null; stringunique_groupidentifiers; FK target references; optional min/max/allowed_values/pattern and severity fields;source_columnoptional,target_typerequired. - Read
Guidedomain/version/default severity or an explicitly documented equivalent header; do not evaluate arbitrary formulas/macros. Allow worksheet reordering; ignore wholly blank data rows. - Validate unique
table_idwithin domain and unique (table_id,target_column), safe file identifiers, source and output name collisions, blank required cells, invalid X values, unknown table references, missing/partial FK metadata and invalid/inconsistent group labels. When an FK points to a table inside the same workbook, validate its target column as metadata only. Cross-domain/external FK references are allowed but unresolved (warn/document rather than reject); do not imply runtime RI checks. - Keep table and column order stable; aggregate independent errors where possible; report sheet+Excel row+column, e.g.
Columns!C248. - No requirement for any source.path, catalog, sink format, partition or technical project config before parsing.
Acceptance
- Correctly reads three sheets and validates only the two data sheets.
- Missing
Rulesworksheet is NOT an error; aRulesworksheet is not used. - Can express different
source_datasetvstarget_table, andsource_columnvstarget_column. - Supports repeated field names across unrelated tables, composite PK and unique groups, FK metadata and severity inheritance.
- Invalid/duplicate/missing headers, refs, flags or key group declarations have precise cell diagnostics and stop before output.
- Real XLSX fixtures (not mocked dicts only), consistent deterministic records; no new dependency/config YAML keys.
Tests first
test_missing_tables_sheet, test_rejects_unknown_table_id_with_cell_location, test_preserves_composite_pk_column_order, test_reads_unique_group_and_fk_metadata, test_rejects_duplicate_target_column, test_parse_without_technical_configuration.
Stay within AGENTS.md limits; split structural validation from I/O if too large.
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]feat(business-contract): read domain workbooks and validate table/column references[/-][+]feat(business-contract): parse Tables + Columns workbook with cell-level errors[/+]