Aglet

Investigate Schema Alignment in Multi-File Imports

Investigate multi-file alignment with small files that deliberately share some headings but differ in order or coverage. Give values distinct meanings so a swapped assignment is visible even when both destination fields accept text. Trace the schema used for each file and keep the combined preview separate from execution behavior.

Build a useful investigation brief

  1. Create a contrasting file set

    Prepare a baseline file, a reordered version, and a file with one optional column missing. Add a duplicate-label case if supported. Specify expected destinations for each source value independently. Keep file identities visible so a final incorrect row can be traced to the layout that actually supplied it.

  2. Trace schema selection and mapping

    Inspect whether the importer reads every schema, reuses the first one, or constructs a combined schema. Follow how each source column resolves to a destination. Record the alignment rule and missing-column treatment, distinguishing a name-based lookup from a positional mapping that merely displays familiar headings in the preview.

  3. Compare bounded alignment behavior

    Run the controlled file set under the documented rule and inspect final values per file. Change only the implicated mapping boundary and repeat. Check repeated labels and missing fields so a correction for reordered columns does not silently invent a match where the source names are ambiguous or absent.

What to carry forward

Deliver the file-schema matrix, per-file mapping trace, and first incorrect assignment. State how unsupported variations should fail or require review. A supported fix preserves intended field meaning across the documented layouts and keeps ambiguous schemas visible, rather than assuming a shared batch implies interchangeable column positions.

Technical background: DuckDB documentation.

Keep the decision with the work.

Use a Work Item in Aglet to record the problem, the evidence you have, and the next decision. Add an owner and priority, then keep updates in the discussion so the next person can follow the reasoning.

Create an account See the product workflow