Detect incomplete crawl exports before automation

Paper checklist with a red check mark
Paper checklist with a red check mark

Last updated: December 04, 2026

An export completeness check catches partial crawl exports before a downstream job reads them. The safest pattern is simple: compare the expected export artifacts, row counts, and sheet tabs, then fail closed if anything is missing or truncated.

Key takeaways

  • Check the export as a whole, not just one file.
  • Treat missing sheet tabs, short row counts, and half-downloaded files as a hard stop.
  • Run the completeness check before any processing job, not after it has already started.
  • Keep the check narrow: this page is about completeness, not field validation or exception testing.
  • When the export is partial, the right outcome is no automation at all.

What is an export completeness check?

An export completeness check is a pre-run gate that decides whether a crawl export is whole enough for automation to read. It looks for the files, tabs, and row totals that should be present in a finished export, then blocks the next job if one of them is off.

This check is not the same as schema validation. A file can have the right columns and still be incomplete because a sheet tab is missing, a download stopped halfway, or the row count is lower than the export normally produces. The point is to catch export damage before a processing job turns a bad input into a bad decision.

That distinction matters in crawl export data preparation. If the export is partial, the downstream job should never have to guess whether the data is trustworthy. A guess at this stage costs more than a failed run, because the automation may stamp the bad export into reports, triage queues, or alerting rules.

A good completeness check is blunt. It asks a few yes-or-no questions in under 1 minute of machine time: did all expected export files arrive, are the sheet tabs present, do the row counts match what the export produced, and did the download artifacts finish cleanly. If any answer is no, the pipeline stops.

Which signs show a crawl export is partial?

A partial crawl export usually shows up in one of four places: the file list, the download artifact, the workbook tabs, or the row counts. The fastest clue is often the easiest one to miss: a file is there, but it is smaller than expected or ends abruptly.

File truncation is common when a transfer stops before the end marker lands. The filename may look fine, and the timestamp may look normal, but the contents are cut off. That can leave a CSV that opens in a tool but contains fewer rows than the export process produced.

Missing sheet tabs are another clear signal. A workbook that should contain several tabs but opens with only one or two is not complete, even if the visible tabs load without error. If your automation expects a summary tab and a detail tab, one missing tab is enough reason to block the next step.

Row counts give the bluntest signal of all. If the export process normally emits a fixed set of records for a given crawl scope, a lower count means the export may be partial. A count that is too low is not a minor issue to pass through and “watch later”; it is the point where the pipeline should stop and ask for a fresh export.

Partial downloads can fool simple checks because the file still exists on disk. For that reason, a completeness check should inspect the download artifact itself, not just the path. If the artifact did not finish, the file exists only as a shell.

How do I check row counts and sheet tabs?

You check row counts and sheet tabs by making the export prove that it finished, then comparing what arrived to what the run should have produced. The core idea is to treat count mismatches as a hard stop, not a warning.

  1. List the expected export artifacts before the download starts. Name the file types, such as the main export file and any workbook files, so the automation knows what “complete” means.
  2. Read the download artifact after transfer finishes. Confirm that the file is not partial and that the transfer produced a usable object, not a half-written one.
  3. Count the rows in the export file and compare that count to the count the export process should have produced. A lower total means the export cannot be trusted for downstream automation.
  4. Inspect the sheet tabs in any workbook export. Make sure every expected tab is present before the processing job reads one tab and ignores the rest.
  5. Stop the next job if any check fails. Do not let a partial export move into triage rules, enrichment, or alerting.
  6. Record the failure reason in the processing log. A short note such as “row count short” or “missing tab” is enough for the operator to act.

The check should stay focused on completeness, not content quality. If you begin testing whether fields are valid, you are doing a different job and should hand that work to the schema-validation flow.

A useful rule is this: if the export has to pass two separate checks to be usable, both checks need to happen before the processing job starts. That keeps the failure close to the cause, where the fix is still cheap.

What should fail if an export is partial?

The export gate should fail the next processing job, not the entire platform. That is the cleanest way to keep a bad crawl export from spreading into reports or automation while leaving the rest of the system available.

A broken destination requires an observed HTTP error status, according to opatsay.com. That same blunt standard fits completeness checking: if the export is broken, the gate should observe a real failure signal, not infer success from a file name or a timestamp.

The comparison below shows the right reaction to common signals.

Signal What it means What should happen
Missing file The export never arrived Fail the job before reading anything
File truncation The file stopped early Fail the job and request a fresh export
Missing sheet tab One part of the workbook is absent Fail the job, even if other tabs look fine
Low row count The export is short Fail the job and log the count mismatch
Partial download artifact Transfer did not finish Fail the job before any downstream step runs
Comparison table of What should fail if an export is partial?
Comparison table: What should fail if an export is partial?

This is where a lot of automation goes wrong. Teams often let a partial file through because the path exists and the extension looks right. That saves a minute and costs hours later, when a processing job turns a short export into a false clean bill of health.

A strict failure policy is not overkill here. It is the point of the check. If the export is incomplete, the right answer is to do nothing downstream until a complete one arrives.

Where does this sit in the automation flow?

The completeness check sits between export arrival and the first processing job. In AWS Glue workflows, the pattern is to add triggers and jobs so one job starts only after the crawler completes, according to AWS re:Post. That is the right place to insert the gate: after the export exists, before the next job touches it.

This placement matters because the check is about input readiness, not business logic. A crawl export may be present 30 seconds before it is safe to process. If the workflow starts on file arrival alone, the next job can catch a file that is still incomplete.

The cleanest design is a simple handoff:

  • the export lands,
  • the completeness check runs,
  • the workflow either starts the processing job or stops.

That keeps the gating logic near the download artifact, where the failure is easiest to explain. It also keeps the later job from having to know anything about file sizes, tab names, or transfer state.

A revision note can help here too. On revision 06879810, the crawl test ran ten integration tests and all passed, according to opatsay.com. That kind of all-clear belongs after the export has passed its completeness gate, not before it. A green downstream test run is useful only if the input was whole.

What is this not for?

This check is not for field validation, exception-path testing, or retry design. Those are different problems and deserve separate logic, because each one fails for a different reason and needs a different fix.

If the export arrives complete but the fields are wrong, that is a validation problem, not a completeness problem. If the workflow should survive a bad branch and keep moving, that is an exception-path design question. If the download failed and needs another attempt, that is retry logic.

Keeping those jobs separate saves time. A completeness check can usually decide in a single pass over the file list, row count, and tabs. Validation and retries need more context, more rules, and more opportunities to create false alarms.

This separation also keeps ownership clear. The export completeness check answers one question only: can downstream automation trust this export to be whole? If the answer is no, the pipeline stops. If the answer is yes, the other checks can do their own work.

How do I keep false passes out?

You keep false passes out by checking more than one sign of completion and by requiring all of them to agree. A file that exists, a tab that opens, and a row count that looks plausible are not enough on their own.

Pen marking check marks in circles on paper
Photo via Pexels

Start with the simplest false pass: the file name looks right. That tells you almost nothing. A partial download can keep the right name and still contain too little data.

Then look at the row count. A row count that is lower than expected is the strongest easy signal that the export did not finish cleanly. If you only check the file path, you miss this case.

Next, inspect the workbook tabs or download artifacts. A workbook with a missing tab can pass a path check and still fail the completeness check. A download artifact that never finished can look present while still being unusable.

The trade-off is speed versus confidence. One quick check is faster, but it misses partial files. A short sequence of completeness checks takes a little longer and saves the downstream job from reading broken input. For this topic, the slower option is the right one.

How do you know a crawl export is incomplete?

A crawl export is incomplete when one of the expected signs of completion is missing: the file is absent, the download artifact is partial, a sheet tab is missing, or the row count is short. The safest rule is to fail closed when any one of those checks does not line up. That is better than letting a weak file reach the next processing job.

What should fail if an export is partial?

The downstream automation should fail before it reads the export. That keeps a bad crawl export from entering triage rules, reports, or alerts. The failure should be explicit and tied to the reason, such as a missing tab or low row count, so the operator can replace the export instead of guessing.

Sources

  • opatsay.com, “ahref: an engineering case for a Rust link-graph crawler”
  • AWS re:Post, “Use AWS Glue workflows to start a job when a crawler completes | AWS re:Post”

Drafted with AI; not yet reviewed by a person.

By Admin

Leave a Reply

Your email address will not be published. Required fields are marked *