Product Business Slice

This is the first curated demo slice. It gives us a small but expressive business model for end-to-end demo and release verification.

Theme

The slice uses three related tables:

  • product

  • product_manager

  • branch

Relationship shape:

  • product n:1 product_manager

  • product_manager n:1 branch

Why This Slice Exists

It is small enough to understand quickly, but rich enough to show visible spreadsheet behavior:

  • multiple sheets

  • FK helper columns

  • list validations

  • per-sheet overrides

  • JSON → XLSX → JSON re-import roundtrip

Artifacts

Dataset:

  • data/product_business_slice/product.json

  • data/product_business_slice/product_manager.json

  • data/product_business_slice/branch.json

  • data/product_business_slice/overrides.yaml

Pipeline:

  • pipelines/demo_product_business_slice.yaml

Command:

make run PIPELINE=./pipelines/demo_product_business_slice.yaml

Source Data

The central business table is product.json:

[
  {
    "id": "P-100",
    "name": "Starter Kit",
    "id_(product_manager)": "PM-10",
    "status": "active",
    "category": "entry"
  }
]

The important part is id_(product_manager). That is the FK-style column that allows the pipeline to derive a helper column from the product_manager table.

The second relation lives in product_manager.json:

[
  {
    "id": "PM-10",
    "name": "Marta Vogel",
    "id_(branch)": "B-001",
    "email": "marta.vogel@example.test"
  }
]

That gives us a transitive business story:

  • a product belongs to a product manager

  • a product manager belongs to a branch

Overrides

The slice also includes sheet-specific rendering overrides:

defaults:
  auto_filter: true
  freeze_header: true

sheets:
  product:
    header_fill_rgb: "#D9EAD3"
  product_manager:
    header_fill_rgb: "#CFE2F3"
  branch:
    auto_filter: false
    freeze_header: false
    header_fill_rgb: "#FCE5CD"

This gives us one workbook with visible differences between sheets instead of a uniform "same everywhere" export.

Pipeline

The pipeline combines five ideas in one small flow:

  • apply_overrides injects workbook and sheet rendering options

  • validate checks duplicate IDs and missing FK targets

  • add_validations adds Excel list validations

  • add_fk_helpers materializes helper columns (and reorder_fk_helpers places them next to their FK column)

  • flatten_headers keeps re-imported JSON readable on the way back

The relevant shape is:

pipeline:
  - step: apply_overrides
    overrides_path: ./data/product_business_slice/overrides.yaml

  - step: validate
    mode_duplicate_ids: warn
    mode_missing_fk: warn
    defaults:
      id_field: id
      label_field: name
      detect_fk: true
      helper_prefix: "_"

  - step: add_validations
    rules:
      - sheet: product
        column: status
        rule:
          type: in_list
          values: [active, pilot, retired]

  - step: add_fk_helpers
    defaults:
      id_field: id
      label_field: name
      detect_fk: true
      helper_prefix: "_"

  - step: reorder_fk_helpers
    helper_prefix: "_"

What To Look For In Excel

On product:

  • helper column for product_manager

  • list validations on status and category

  • filter enabled

  • freeze enabled

On branch:

  • list validation on country

  • filter disabled

  • freeze disabled

  • distinct header styling via sheet override

What Comes Back On Re-import

After the workbook is read back again, the helper columns stay understandable because the pipeline flattens headers before export.

Examples:

  • product gets _product_manager_name

  • product_manager gets _branch_name

This keeps the roundtrip suitable for explanation and testing, instead of returning tuple-shaped serialized header names.

Why This Is A Good First Slice

This slice is intentionally not maximal. It works as the first benchmark because it already combines:

  • business-readable source data

  • visible spreadsheet UX

  • validation behavior

  • FK-driven enrichment

  • clean roundtrip behavior

That makes it a strong base for later additions such as summary sheets, named ranges, or multi-header examples.

Current Notes

For this slice we flatten headers before writing so that helper columns come back from re-import as readable JSON keys such as _product_manager_name.