Course outline

Data Engineering / Basic: contracts and repeatable batches / Lesson 7

File manifests and ingestion reconciliation

Use a delivery manifest to reconcile file identity, parsing and publication for one bounded batch.

About 22 min read20 worked examples20 practice exercisesContent reviewed
On this page

Lesson goals

  • Distinguish file integrity from business completeness.
  • Reconcile delivered, accepted and rejected records before publication.
  • Reconcile file identities, logical record outcomes and business keys under a manifest.
  • Separate checksum integrity, source authenticity and publication completeness.

Describe the delivery boundary

A file batch needs an identity, expected files, format and ownership before ingestion begins. A manifest can record names, byte sizes, checksums, row counts and a source interval, but each field needs a precise definition. Decide whether a count includes a header and which bytes a checksum covers. A manifest received through the same compromised channel as its files does not independently authenticate the source.

Inspect a synthetic manifest

This illustrative JSON names one UTF-8 CSV file and expects three data rows. It intentionally omits a checksum; a production contract can require one and define the algorithm and exact bytes. The batch identifier is a business delivery identity, not a guarantee that the file is complete. Keep the manifest and received file version together so a later retry can be reconciled against the original delivery.

json A synthetic batch manifest
{"batch_id":"orders-2026-11-05","files":[{"name":"orders-01.csv","rows":3}],"encoding":"utf-8"}

The rows field counts data rows for this example; it does not validate the file or its source.

Parse and account for each row

The matching fixture has a header and three data rows. A real parser must follow the agreed delimiter, quoting, encoding and newline rules rather than splitting every line blindly. Compare delivered data rows with accepted and rejected rows, keeping rejection reasons and sanitized source coordinates. If one row fails validation, publication must follow the agreed reject threshold instead of silently reporting all three as accepted.

csv A three-row synthetic CSV
order_id,amount
A1,10
A2,20
A3,30

The header is not included in the manifest’s count; the example does not perform ingestion.

Separate integrity from completeness

A checksum comparison can detect a mismatch between received bytes and a trusted expected digest, but it cannot prove that the source included every required order or that amounts are correct. Compare the source interval and business identifiers with an independent control where available. Record missing files, extra files and duplicates explicitly. Do not replace a failed digest with a newly computed value merely to make the check pass.

Publish only a reconciled batch

Stage the input under its batch identity, validate parsing and business controls, then publish using the platform’s documented atomic boundary. In a disposable test, omit one file and introduce one malformed row; verify the defined blocked or rejected outcome. Retry the same batch and compare destination keys and values. Preserve evidence of the attempt and any accepted exception before making a result visible to consumers.

Define what the manifest promises

A manifest is a delivery contract for a bounded set, not a magic proof that the business data is correct. Give the batch a stable identity and source interval, list expected file identities and versions, and define format, encoding, header policy, expected record counts and ownership. If a checksum is required, specify its algorithm, exact byte scope and trusted expected value. A row count must say whether it counts logical data records, headers or physical lines. The consumer should know whether an empty partition is permitted and how completion is signaled.

A path alone is weak identity when its content can be overwritten. Preserve the manifest with the received immutable file version or a trustworthy reference, so a retry can use the same delivery. Identify missing, extra and duplicate file identities before parsing. A manifest delivered through the same compromised channel as the files is not independent authentication. Establish source authenticity and authorization separately from checking whether received bytes match a stated digest.

Account for logical records

Decode bytes with the agreed encoding, then parse using the declared delimiter, quote and newline rules. A quoted CSV field can include a delimiter or newline, so a physical line count is not always a logical record count. If the first parsed record is a declared header, exclude it from the business data-row count. Validate field count and domain values after parsing; a syntactically parsed amount can still be invalid for the business contract. Preserve a sanitized file identity, record position and reason for a rejection where policy allows.

Reconcile at a consistent grain: delivered logical data records should equal accepted plus rejected plus any explicitly categorized exclusions. For three delivered records, two accepted and one rejected accounts for all three, but publication depends on the predeclared threshold. If only two accepted are reported with no rejection, one outcome is unexplained. Do not count a rejected row as accepted to make a dashboard green, and do not expose sensitive raw payloads in general logs.

Separate byte integrity from completeness

A checksum comparison can detect that received bytes differ from a trusted expected digest, provided both sides hash the same exact bytes with the same algorithm. Define whether compression, line-ending changes or a byte-order mark are inside that scope. Do not replace a failed expected digest with the newly observed digest merely to pass the check; investigate source, transfer and version first. A digest from an untrusted source alongside the same file provides limited authenticity evidence because both could be changed together.

A matching digest says the received bytes match the trusted reference. It does not prove that the producer included every required order, that a stated amount is correct, or that the expected interval was complete. Compare independent business controls where available: expected order keys, source totals, interval or a producer-approved count. Counts and totals can themselves hide substitutions or offsetting errors, so inspect representative identities and values. Record which claim each check actually supports.

Stage, reconcile and publish

Stage the exact received batch and manifest under a stable identity, validate file set, integrity, parsing, record outcomes and business controls, then accept or reject according to the policy declared before the result. A candidate containing two readable files is not complete if the manifest requires three. A zero-row partition with an explicit completion marker may be acceptable when the contract allows it; an absent file without such evidence remains unresolved. Extra files also require a policy rather than silent inclusion.

Publish through the actual platform’s documented accepted-version or transaction mechanism. A manifest is a logical list and does not itself make a multi-file write atomic. If an interruption occurs after writing some files but before publication, keep the previous accepted version visible and retain enough staged evidence for recovery. A labeled partial result may be allowed by a separate explicit policy; it must not be presented as complete.

Test retries and evidence boundaries

A repeat of the same batch should use the same immutable manifest and input versions when reproducibility is required. A destination must define whether it replaces a snapshot, merges by business key or appends events, and how it detects duplicate batch or record identity. Same identity with changed content is a conflict or a versioned correction according to policy, not automatically a harmless retry. Coordinate durable effects and progress using a real supported boundary or reconciliation protocol.

Rehearse missing and extra files, malformed quoting, invalid UTF-8, checksum mismatch, duplicate keys, reject thresholds and an interrupted publication on synthetic data. Compare accepted destination keys and values after retry, not merely a successful task status. Record source interval, schema and transformation versions, counts, decisions and sanitized error references. The scenarios below are non-runnable conceptual fixtures; no file, destination or hashing service is accessed.

20 worked examples

1. Data row count

Problem: How many data records does the declared manifest expect in this CSV fixture?

  1. The contract explicitly excludes the declared header from its row count.
  2. The remaining three logical records are A1, A2 and A3.
text Data row count
manifest: rows=3 data records; header=true
order_id,amount
A1,10
A2,20
A3,30
Expected output
3 data records

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Three data records.

Why this result follows: A manifest count is meaningful only when its record and header policy is defined.

2. Header miscount

Problem: What discrepancy results if the header is mistakenly counted as data?

  1. The physical line total includes the header and three data lines.
  2. The manifest’s data-row definition excludes that header.
text Header miscount
manifest expected data rows=3
physical lines: header + A1 + A2 + A3
consumer reports data rows=4
Expected output
Reported count is one too high.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Correct the report to three data records.

Why this result follows: Header policy separates metadata from the population of business records. This follows the stated synthetic manifest policy.

3. Quoted newline

Problem: Why can a CSV record count differ from physical line count?

  1. The quoted note continues across the embedded newline.
  2. The closing quote completes one data record rather than creating a second record.
text Quoted newline
id,note
A1,"first line
second line"
contract: quoted newlines allowed
Expected output
One header and one logical data record span three physical lines.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: One data record.

Why this result follows: A parser tracks quote state across physical line boundaries. This follows the stated synthetic manifest policy.

4. Complete accounting

Problem: Do two accepted and one rejected record account for three delivered rows?

  1. The accepted and rejected counts use the same logical-record grain.
  2. Their sum is 2 + 1 = 3, matching delivered records.
text Complete accounting
delivered=3; accepted=2; rejected=1
policy: all outcomes recorded
Expected output
Yes; all three have a recorded outcome.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Three records are accounted for; publication still depends on policy.

Why this result follows: Reconciliation of outcomes is separate from an acceptance threshold. This follows the stated synthetic manifest policy.

5. Unexplained outcome

Problem: Does a count of two accepted and zero rejected reconcile three delivered rows?

  1. The recorded outcomes sum to only two.
  2. One of the three delivered records has no documented category.
text Unexplained outcome
delivered=3; accepted=2; rejected=0
policy: every delivered record accounted for
Expected output
No; one record is unexplained.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Hold and trace one missing outcome.

Why this result follows: Counts must cover the entire declared input population at the same grain.

6. Reject threshold

Problem: Can a batch with one reject publish under a zero-reject policy?

  1. All three records are accounted for in the counts.
  2. The policy nevertheless disallows any rejected record.
text Reject threshold
delivered=3; accepted=2; rejected=1
policy: rejected must equal 0
Expected output
No; hold the batch.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Publication is blocked until the policy is satisfied or formally changed.

Why this result follows: A reconciled count does not override a predeclared acceptance rule. This follows the stated synthetic manifest policy.

7. Permitted partial

Problem: What may be published under an explicit labeled-partial policy?

  1. The declared threshold permits one rejection.
  2. The label and reason prevent consumers from mistaking two accepted records for complete coverage.
text Permitted partial
delivered=3; accepted=2; rejected=1
policy: one reject allowed; label partial and retain reason
Expected output
A labeled partial result may be accepted if other checks pass.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Publish only as partial under the stated policy.

Why this result follows: A partial-data contract must disclose the coverage it actually provides. This follows the stated synthetic manifest policy.

8. Missing file

Problem: What is the status of a delivery missing one required file?

  1. The received set lacks B.csv listed by the manifest.
  2. The all-required policy prohibits treating the subset as complete.
text Missing file
manifest files=[A.csv,B.csv,C.csv]
received=[A.csv,C.csv]; policy=all required
Expected output
Incomplete; B.csv is missing.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Hold the batch and request or investigate B.csv.

Why this result follows: File-set reconciliation checks identities rather than merely opening available files. This follows the stated synthetic manifest policy.

9. Extra file

Problem: What should happen to an unexpected file under a reject-extra policy?

  1. The expected identities are A.csv and B.csv.
  2. C.csv is not listed and the declared policy blocks acceptance.
text Extra file
manifest files=[A.csv,B.csv]
received=[A.csv,B.csv,C.csv]
policy: extra files block acceptance
Expected output
Hold the batch; C.csv is unexpected.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Investigate C.csv before publication.

Why this result follows: An extra file can indicate a wrong interval, duplicate delivery or unexpected source version.

10. Duplicate filename

Problem: Why does a duplicate delivered identity require a decision?

  1. The expected set names B.csv once.
  2. The received list claims the same file identity twice. This is evaluated against the stated file-set contract.
text Duplicate filename
manifest files=[A.csv,B.csv]
received identities=[A.csv,B.csv,B.csv]
policy: file identities unique
Expected output
Duplicate B.csv violates the declared file-set rule.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Hold or resolve the duplicate under policy.

Why this result follows: File identity and multiplicity matter even when every expected name appears. This follows the stated synthetic manifest policy.

11. Checksum match

Problem: What does a matching trusted digest prove in this synthetic comparison?

  1. Both sides use the same declared algorithm and byte scope.
  2. The observed digest equals the trusted expected value H.
text Checksum match
expected digest=H; received bytes digest=H
algorithm and byte scope match; expected digest trusted
Expected output
The received bytes match the trusted digest under the stated comparison.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Byte-integrity comparison passes; business completeness remains separate.

Why this result follows: A digest comparison checks a representation, not every business fact inside it.

12. Checksum mismatch

Problem: What should happen when received bytes do not match the trusted digest?

  1. The observed digest H2 differs from expected H1.
  2. The contract requires equality before accepting the file.
text Checksum mismatch
expected digest=H1; received digest=H2
policy: digest must match before acceptance
Expected output
Hold and investigate the mismatch.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Do not substitute H2 merely to pass the check.

Why this result follows: A failed integrity check is evidence to investigate source, transfer and version.

13. Untrusted channel

Problem: Does a digest sent with a file on the same compromised channel authenticate the producer?

  1. An attacker controlling that channel could alter both file and accompanying digest.
  2. A matching pair alone therefore cannot identify an authorized producer.
text Untrusted channel
file and expected digest arrive through the same untrusted channel
no independent signature or trusted reference
Expected output
No independent source authentication is established.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Verify provenance through an independent trusted mechanism.

Why this result follows: Integrity comparison and source authenticity are separate security claims. This follows the stated synthetic manifest policy.

14. Missing business order

Problem: What does a matching digest mean when an independently expected order is absent?

  1. The digest validates the received byte representation against its reference.
  2. The independent key control expects A3, which is not in the file.
text Missing business order
trusted digest matches file
independent expected orders=[A1,A2,A3]
file keys=[A1,A2]
Expected output
Bytes match, but business coverage is incomplete.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Investigate missing order A3 before claiming completeness.

Why this result follows: A byte-perfect file can faithfully contain an incomplete source extract. This follows the stated synthetic manifest policy.

15. Offsetting amounts

Problem: Can a manifest count and total match while per-order amounts are wrong?

  1. The first amount is two too low and the second two too high.
  2. The errors cancel in the aggregate total.
text Offsetting amounts
expected: A1=10, A2=20; total=30
received: A1=8, A2=22; total=30
Expected output
Yes; the total matches while both amounts differ.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Compare values by business key.

Why this result follows: Aggregate controls complement but do not replace per-key validation. This follows the stated synthetic manifest policy.

16. Empty partition

Problem: Can a zero-row partition satisfy this synthetic manifest policy?

  1. The marker states the producer completed the partition.
  2. The contract explicitly allows zero data records for it.
text Empty partition
partition=Wed; rows=0; complete=true
policy: empty allowed with completion marker
Expected output
Yes, if other checks pass.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Accept the empty partition conditionally.

Why this result follows: A completed empty delivery differs from an absent file without completion evidence.

17. Changed file version

Problem: Can a retry use a replacement file at the same path and claim the same bytes?

  1. The path is unchanged but its content version differs.
  2. A reproducible retry of v1 requires the original file version or a trustworthy reference.
text Changed file version
batch=B1; path=orders.csv
attempt 1 version=v1; retry path now contains v2
Expected output
Not without resolving the intended immutable version.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Use v1 or record and approve a distinct delivery.

Why this result follows: A mutable location is not a stable file identity. This follows the stated synthetic manifest policy.

18. Duplicate record key

Problem: What follows when a one-order-per-key contract receives A2 twice?

  1. The same business key appears in two parsed records.
  2. The policy requires one order per key and rejects duplicates.
text Duplicate record key
parsed keys=[A1,A2,A2]
policy: duplicate order key rejects batch
Expected output
Hold the batch and report duplicate A2.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Do not treat three rows as three distinct orders.

Why this result follows: Record identity must be reconciled separately from row count. This follows the stated synthetic manifest policy.

19. Interrupted publication

Problem: What should consumers see if publication stops after two of three staged files?

  1. The candidate lacks required file C.
  2. The accepted-version boundary has not been crossed. This is evaluated against the stated file-set contract.
text Interrupted publication
accepted version=v1
candidate v2 requires [A,B,C]; only [A,B] written; publish not committed
Expected output
Consumers remain on v1 under the stated acceptance policy.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Hold v2 and retain failure evidence.

Why this result follows: Readable staged parts do not constitute a complete published version. This follows the stated synthetic manifest policy.

20. Repeat-safe retry

Problem: What should be compared after retrying the same accepted synthetic batch?

  1. A retry may duplicate, omit or alter records depending on sink semantics.
  2. Equal task status or row count alone would not reveal every wrong value.
text Repeat-safe retry
batch=B1; attempt A1 interrupted; attempt A2 replays same input
expected destination={(A1,10),(A2,20)}
Expected output
Compare destination keys and values with the expected set.

Synthetic manifest or reconciliation trace; outcomes are reasoned and no file or external system was accessed.

Expected result: Verify A1/10 and A2/20 each occur once.

Why this result follows: Stable batch and record identity plus value checks make replay outcomes reviewable.

Common errors and fixes

The header is counted as a business record.

Why it happens
The manifest count was not defined.
How to fix it
Reconcile using the agreed data-row definition.
Prevent it next time
Document and test header handling.

A matching digest is treated as proof of complete business data.

Why it happens
Byte integrity was confused with source completeness.
How to fix it
Compare independent interval and business controls.
Prevent it next time
Review integrity and completeness separately.

A retry appends the same batch twice.

Why it happens
The destination lacks a stable batch or record identity.
How to fix it
Reconcile and apply the documented repeat-safe publication rule.
Prevent it next time
Test interruption and replay in an isolated destination.

20 practice exercises

1. The manifest expects three data rows; two pass and one is rejected. What must the operator report?

Show hint

Reconcile all delivered logical records, then apply the stated acceptance threshold.

Show worked solution

Report three delivered rows, two accepted and one rejected, with the rejection reason and batch identity. Whether publication may proceed depends on the documented threshold; the operator must not label all three accepted.

Three delivered records equal two accepted plus one rejected. Report the batch identity, all three counts and a scoped rejection reason; publication depends on the predeclared threshold, so do not label the rejected row accepted.

Check your solution

  • Report delivered 3, accepted 2 and rejected 1.
  • Apply the declared reject threshold.

2. The file checksum matches but one expected order is absent. What does that establish?

Show hint

Separate the trusted byte comparison from independent business coverage.

Show worked solution

The received bytes match the trusted digest, but the source content can still be incomplete. Compare an independent source control or expected business identities and resolve the missing order before claiming completeness.

A matching trusted digest supports byte-integrity comparison but cannot prove the source included every required order. Compare an independent expected key or source control and resolve the absent order before claiming completeness.

Check your solution

  • State that the trusted digest matches received bytes.
  • Investigate the missing business order separately.

3. A manifest expects three data rows; the file has one header and three records. What count is reconciled?

Show hint

Trace file identity, record grain, integrity evidence and acceptance policy.

Show worked solution

Count the three logical data records and exclude the declared header. The manifest’s rows field must explicitly define that policy. Parse according to the CSV dialect rather than assuming physical line count always equals records when quoted newlines are allowed.

Check your solution

  • Three data records
  • Header is excluded

4. Three delivered records produce two accepted and one rejected. State the accounting and publication decision under zero-reject policy.

Show hint

Trace file identity, record grain, integrity evidence and acceptance policy.

Show worked solution

The counts reconcile because 2 + 1 = 3, but the zero-reject policy blocks publication. Report the batch identity and scoped rejection reason rather than calling all three accepted. Correct or formally resolve the rejection before publishing a complete version.

Check your solution

  • All three are accounted for
  • One reject blocks publication

5. A manifest requires A and B but only A arrives. What should the operator report and do?

Show hint

Trace file identity, record grain, integrity evidence and acceptance policy.

Show worked solution

Report B as missing and hold the batch under the all-required policy. The readability or checksum of A does not establish that B arrived. Preserve the manifest and received version, and request the missing file or documented completion evidence.

Check your solution

  • B is missing
  • Hold incomplete batch

6. A manifest lists A and B; an extra C arrives and policy rejects extras. Decide the outcome.

Show hint

Trace file identity, record grain, integrity evidence and acceptance policy.

Show worked solution

Hold the batch because C is not an expected file identity and the stated policy blocks extras. Investigate whether it belongs to another interval or is a duplicate delivery. Do not silently include it or discard it without recording the decision.

Check your solution

  • C is unexpected
  • Reject-extra policy blocks acceptance

7. A file’s digest differs from the trusted expected digest. What should not be done to make the check pass?

Show hint

Trace file identity, record grain, integrity evidence and acceptance policy.

Show worked solution

Do not replace the expected digest with the newly observed value merely to force a match. Hold the file and investigate source version, byte scope, algorithm and transfer integrity. Recompute only under a documented correction process with a trusted reference.

Check your solution

  • Expected and observed differ
  • Investigate rather than overwrite expectation

8. A trusted checksum matches but expected order A3 is absent. Explain the two conclusions.

Show hint

Trace file identity, record grain, integrity evidence and acceptance policy.

Show worked solution

The received bytes match the trusted digest under the declared algorithm and scope, but an independent business control shows A3 is missing. Investigate source completeness before publication. Byte integrity does not prove that the producer extracted every required order.

Check your solution

  • Digest comparison passes
  • Business order A3 is missing

9. A manifest counts physical lines, but a quoted CSV field contains a newline. What contract issue arises?

Show hint

Trace file identity, record grain, integrity evidence and acceptance policy.

Show worked solution

One logical data record can span multiple physical lines, so line count and record count may differ. Define whether the manifest counts parsed logical data records or physical lines, then use the declared CSV dialect and header policy for reconciliation. Preserve the original source reference on failure.

Check your solution

  • Quoted newline spans lines
  • Define logical record counting

10. An invalid UTF-8 byte appears in an identifier under strict decoding. How should the ingestion account for it?

Show hint

Trace file identity, record grain, integrity evidence and acceptance policy.

Show worked solution

Record a scoped decoding failure and source coordinate under the rejection policy; do not silently replace the byte and accept a changed identifier. Preserve a protected reference to the original bytes where permitted. Include the failed record or file in the reconciliation outcome.

Check your solution

  • Strict decoding fails
  • Retain scoped reason and identity

11. The expected business keys are A1 and A2 but the file has A1 and A3. Both counts are two. Diagnose.

Show hint

Trace file identity, record grain, integrity evidence and acceptance policy.

Show worked solution

The matching counts hide missing A2 and unexpected A3. Compare key membership and source interval, then apply the declared rejection or repair policy. A row-count match alone does not prove that the intended business population was delivered.

Check your solution

  • A2 is missing
  • A3 is unexpected

12. Expected amounts 10 and 20 become 9 and 21. Why does a total control of 30 miss the problem?

Show hint

Trace file identity, record grain, integrity evidence and acceptance policy.

Show worked solution

Both pairs sum to 30 because the decrease and increase cancel. Compare each amount by its business key and investigate the transformation or source mapping. Aggregate totals are useful controls, but they do not prove every individual value is correct.

Check your solution

  • Both totals equal 30
  • Per-key amounts differ

13. A zero-row partition has a completion marker and empty days are allowed. How is it different from a missing file?

Show hint

Trace file identity, record grain, integrity evidence and acceptance policy.

Show worked solution

The marker establishes a completed empty result under the stated contract, so it can be accepted if remaining checks pass. A missing file without completion evidence is unresolved, not automatically empty. Retain interval and version with the marker.

Check your solution

  • Empty result has completion evidence
  • Missing file remains unresolved

14. A retry reads a file at the same path after the producer overwrote it. What identity check is needed?

Show hint

Trace file identity, record grain, integrity evidence and acceptance policy.

Show worked solution

Compare the immutable file version or trusted content identity with the manifest for the original batch. A path that now contains different bytes is not the same input. Use the original version for a reproducible retry or record and approve a distinct delivery.

Check your solution

  • Path alone is insufficient
  • Pin the intended file version

15. A parsed feed contains order keys A1, A2, A2 and policy rejects duplicates. What is the decision?

Show hint

Trace file identity, record grain, integrity evidence and acceptance policy.

Show worked solution

Hold or reject the batch because A2 appears twice at the one-order-per-key grain. Record the duplicate key and source coordinates, then follow the correction policy. Three parsed rows do not establish three distinct orders.

Check your solution

  • A2 is duplicated
  • Duplicate policy blocks acceptance

16. An accepted version v1 exists when candidate v2 fails after two of three file writes. What should consumers see?

Show hint

Trace file identity, record grain, integrity evidence and acceptance policy.

Show worked solution

Consumers should continue to select v1 under the stated accepted-version policy. Candidate v2 is incomplete and should remain staged with failure evidence for recovery. Do not expose its two readable files as a complete new dataset.

Check your solution

  • v2 lacks a required file
  • Keep v1 visible

17. A retry reports success and destination count matches, but one amount differs. Is replay verified?

Show hint

Trace file identity, record grain, integrity evidence and acceptance policy.

Show worked solution

No. Equal counts can hide a wrong value or compensating key substitution. Compare the expected business key set and values for the batch, investigate the differing amount, and validate the sink’s replace, merge or append policy before accepting the replay.

Check your solution

  • Count match is insufficient
  • Compare per-key values

18. A digest is delivered over the same channel as the file and both may be tampered with. What remains unproven?

Show hint

Trace file identity, record grain, integrity evidence and acceptance policy.

Show worked solution

A matching file and digest from the same compromised channel do not independently authenticate the producer because both can be changed together. Use an independent trusted reference or signature mechanism appropriate to the environment. Keep byte integrity and authenticity as separate claims.

Check your solution

  • Same-channel match lacks independent authenticity
  • Verify provenance separately

19. A manifest says rows=3 but does not define whether the header counts. What should be agreed before ingestion?

Show hint

Trace file identity, record grain, integrity evidence and acceptance policy.

Show worked solution

Specify whether rows means parsed logical data records and whether the header is excluded, along with delimiter, quoting and encoding. Then test a fixture with a quoted newline. An ambiguous count cannot support reliable reconciliation between producer and consumer.

Check your solution

  • Define data-row versus header count
  • Test the declared CSV dialect

20. A reject log contains a full sensitive row. What narrower evidence can support reconciliation?

Show hint

Trace file identity, record grain, integrity evidence and acceptance policy.

Show worked solution

Retain the batch and file version, sanitized record coordinate and rejection category, with a protected source reference when policy permits. Avoid copying unrelated personal fields into ordinary logs. Apply explicit retention and access rules while preserving enough evidence to count and investigate the rejection.

Check your solution

  • Keep scoped identity and reason
  • Avoid unnecessary sensitive payload

Key takeaways

  • Define manifest fields and parsing boundaries precisely.
  • Reconcile byte integrity, row accounting and business completeness separately.
  • A manifest field needs an explicit count, byte-scope and version definition.
  • A matching digest does not prove business completeness or source authenticity.
  • Consumers should see a reconciled accepted version, not staged fragments.

Official references