Aglet

Keep Multi-File Import Alignment Predictable

The durable lesson is the rule that connects each source file’s columns to destination meaning. Document that rule and the variations it supports. Keep source identity with the smallest contrasting file set so future import changes can be reviewed without assuming every file in a batch inherits the first file’s schema.

Keep the lesson for the next incident

  1. Document alignment and missing-field rules

    State whether fields align by name, position, or an explicit reviewed mapping, and explain how missing or repeated headings are handled. Keep preview behavior connected to that contract. A user should be able to tell whether adding another file requires reviewing a new schema before the combined import begins.

  2. Retain a contrasting schema set

    Keep small consistent, reordered, and missing-column files with distinct expected destination values. Include the original ambiguous layout if relevant. Record the result with file order reversed so a later implementation cannot accidentally pass by selecting one fortunate first file whose schema happens to match the expected output.

  3. Review producer and schema changes

    Assign review when another producer, optional source field, or batch-alignment rule is introduced. Compare per-file values through execution and preserve enough source identity for diagnosis. Track confirmed wrong-field acceptance separately from explicit schema rejection, since a valid-looking assignment can evade ordinary validation and still misrepresent the imported information.

What to carry forward

Close with a clear alignment contract, a compact multi-file fixture set, and an owner for schema changes. Preserve unsupported ambiguity in guidance. The next maintainer should be able to explain which destination receives a later file’s column without relying on its position in an earlier file or the batch’s filename pattern.

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