ETL requirements document with exception cases

AutoSpark

The synthetic requirements example used in the linked traceability matrix.

Specify the transformation and its exceptions

An ETL requirements document should define how each source record becomes an accepted output, what happens when it cannot, and how the result will be reconciled. Include identity and repeat-run behaviour. A list of source and target columns does not establish those rules.

This vendor-neutral worksheet is an authored design aid. Its synthetic example illustrates acceptance cases; an implementation still needs validation against the actual source, target and business rules.

RequirementRecord explicitly
Scope and grainIncluded sources, extraction boundary and what one target row represents
IdentitySource key, target key, collision handling and update policy
MappingSource field, target field, transformation and rule owner
Missing or invalid valuesAccepted blanks, rejected values and retained reason
ReconciliationWhich counts and totals should reconcile, with justified exclusions
Repeat runExpected effect of retrying the same input and of corrected input
RecoveryFailure visibility, owner and restart point
AcceptanceGolden input, expected output and exception records

Synthetic mapping with an exception

Suppose a fictional destination requires a nonempty customer ID and an integer quantity greater than zero. These are example rules, not a universal order model.

Input rowCustomer IDQuantity textExpected result
1C-012One accepted row with quantity 2
2Empty3Rejected with missing-customer reason
3C-02twoRejected with invalid-quantity reason

For this fixture, three input rows produce one accepted row and two rejected rows. Retain enough permitted context to investigate the rejected rows. Do not quietly coerce “two” into a value unless an explicit rule authorises that interpretation.

Now retry the same fixture. Decide whether the target should still contain one accepted row or intentionally contain a second batch. Write the expected outcome and identity rule before implementing a retry mechanism. Repeat-run safety depends on that contract.

Check what the counts miss

Matching row counts do not prove that values were mapped correctly. Compare the accepted output with the expected fields. Test duplicate keys, corrected records and an interruption between writes. Define how exceptions are corrected and whether reprocessing changes the earlier audit record.

Link the agreed rules and tests through the requirements traceability matrix. A source owner should review the mappings; the delivery team should demonstrate the boundary cases on the intended platform before release.

What should happen to invalid records and repeated input?

Define mapping, rejection, reconciliation and repeat-run acceptance using a small explicit fixture.

Your starting question: What should happen to invalid records and repeated input?

Start by checking

  1. Define row identity and mapping rules.
  2. Retain rejection reasons.
  3. Demonstrate retry and interruption cases.

Evidence to gather

  • Source-target mapping and permitted sample rows.
  • Expected output and exception records.

Not established yet

  • Matching counts prove correct values.
  • Retrying is safe without an identity contract.

Discuss this investigation