EddytorDocs & API
07 · Tables A→ZH · Edit data over time

Bulk corrections safely

The validate → fix → re-validate loop for correcting data at scale without surprises.

When you're fixing data at scale - typos in a constrained column, bad values, a botched import - do it as a loop: find the problems, fix them in one atomic batch, confirm clean.

The loop

  1. Find - run the validators:
    validate_constraints(table)        # PK / NOT NULL / CHECK violations, with sample rows
    validate_domain_values(table)      # domain mismatches + typo suggestions
  2. Fix - apply corrections in one merge_rows batch (use the typo suggestions, e.g. "actve" → "active"). One batch = one version.
  3. Re-validate - run both validators again; repeat until zero.
  4. Confirm - profile_table for a final sanity check, and get_table_history to see the expected row metrics.

Why this is safe

Good to know

Validation reports, it doesn't auto-fix - so you review before writing. The fix merge_rows is atomic: if any corrected row still violates a constraint, the whole batch is rejected and nothing half-lands. And the write is a Delta version, so a wrong correction is reversible.

Tips

  • Batch, don't drip - one large merge_rows beats thousands of single-row writes (fewer versions, less compaction churn).
  • Validate after every bulk mutation, not just corrections - make validate_constraints + validate_domain_values a habit.
  • For reference-domain orphans (a deleted source value), validate_domain_values is what surfaces them.

Next

On this page