Check Field Mapping After a CSV Migration With AI
Short answer
Check field mapping after a CSV migration in Assistly. Find dropped fields, changed formats, missing values, and records that need reconciliation.
Migration batch INV-1258 looked finished for a week. The freight desk in Cairo had moved its consignment records, row counts were close, every report ran, and then a clerk asked why customer 00412 could not be found. The new system had read the reference as a number, dropped the leading zeros, and the customer became 412. Nothing crashed. The meaning of the data quietly changed, which is the only kind of migration error worth building a process around.
The check compares the source snapshot against the destination snapshot, field by field, under a written mapping document. Assistly reads the files you attach, joins on a deterministic key, drafts the findings, and produces an exceptions workbook; it does not fix the destination or rerun the migration.
Inputs and the join key
Three files, in this order in one message. The source snapshot taken before migration, header intact. The destination snapshot exported afterward, with renamed columns documented. The mapping document listing each source column, its destination, the transformation applied, and the intended data type; without one, you can detect differences but not judge which are defects. Note each snapshot's export time.
The join key is the load-bearing decision. Use a value the migration did not alter, like the original order reference, and test it first: count distinct values on both sides and confirm uniqueness, because a repeating key produces confident nonsense. Document the key's exact treatment, for example: order_ref, text, trimmed, no case folding. Position-dependent keys are excluded, since one sort change silently realigns every record. When the migrated records are invoices, match the two exports by invoice number before reviewing mapped values.
The checks that find silent damage
Leading zeros: compare values as text, not numbers, and flag any key or code whose text form lost characters; 00412 becoming 412 fails the join and still leaves plausible totals behind it. Blank versus zero: a blank usually means unknown and zero means known to be zero, and migrations that convert blanks to zeros to satisfy a numeric column poison averages, so classify every mapped field as blank, zero, or populated on both sides and report rows where the class changed. Timestamps: write down each side's zone, convert to one reference zone before comparing dates, and watch a date-only field derived from a timestamp, which can shift a day at a boundary. Money: confirm whether amounts live in whole units or minor units, because 4,264.00 EGP and 426,400 piastres are the same money only if the mapping says multiply by 100. Allowed values: list the distinct statuses on both sides, apply the translation table, and report unmapped values in either direction. Counts: rows in each file, distinct keys in each, keys in both, source-only, destination-only, every difference examined by listing the keys rather than rounding it into acceptance. If a record was updated after first load, compare a last-modified field where one exists; where none exists, say so.
Worked examples
The four keys that explain themselves
What to give Assistly. orders_source.csv with 1,284 rows and orders_dest.csv with 1,281, join key order_ref as text, trimmed, no case folding, per mapping document MAP-14 rev B. The count block: 1,277 keys in both, 4 only in source, 0 only in destination. The four source-only keys: 00412, 00587, 00613, 00990. The destination shows the same orders under 412, 587, 613, and 990, stored as numbers.
What Assistly returns. The finding, not a guess: the migration converted the key to a number and dropped leading zeros; four orders are not missing. The evidence is the four stripped values appearing under their shorter forms. The exceptions sheet carries the four pairs with both values stored as text so the zeros survive the workbook, and the defect routes to the migration owner, who corrects the column type before reload. A naive read of the same counts, four records lost, would have sent everyone hunting through backups for rows sitting in plain sight one keystroke away.
How to verify it. Search the destination file for 412 and confirm the same order sits there with matching amounts, and that no other order maps to 412 after normalization. Then hand the owner the four pairs and the column type finding.
Totals that agree while one record is wrong
What to give Assistly. Three batches under the same mapping, source amount_egp in pounds with two decimals, destination amount_piastres as integer. Batch one: source total 412,936.40, destination 41,293,640. Batch two: source 58,210.75, destination 5,821,075. Batch three: source 58,210.75, destination 58,210,750.
What Assistly returns. Batches one and two reconcile exactly: 41,293,640 divided by 100 is 412,936.40, and 5,821,075 divided by 100 is 58,210.75. Batch three does not: the destination is ten times the source, meaning one record stored with its amount multiplied by ten. The locating method is mechanical: compare every matched pair after conversion, sort by absolute difference, and the corrupted record stands alone at the top, 4,264.00 against 42,640.00. It becomes an exception row with both values shown. Totals are a smoke detector, not a fire inspection; per-record comparison is what finds the single corrupted row hiding inside three clean-looking sums.
How to verify it. Divide the batch-three total by hand and see the factor of ten. Sort the per-record differences yourself and confirm exactly one record sits at the top of the gap.
Exceptions sheet, QA, and handoff
Every discrepancy becomes one row: exception ID, join key, field, source value as text, destination value as text, check type (count, type, blank-zero, timezone, currency, allowed value), severity, date observed, status. Text storage is what keeps zeros and decimals alive inside the record. Before handoff: the exception rows must equal the differences counted in the summary, five exceptions get traced against the original exports, and the key counts must reconcile to the row counts. Where both sides export as matching spreadsheets, the local comparison tool joins exact keys and verifies totals. The handoff goes to the person who owns the mapping, not a general inbox, carrying the summary counts, the mapping version, both export times, the exceptions sheet, and the limitations, with confirmed findings and inferences labeled differently. The report stops at naming defects with evidence: choosing fixes, and pressing the button on any reload, belongs to the owner at their own review step. Continue with a related workflow: Analyze Ecommerce Return Reasons From CSV With AI
Prompt to try in Assistly
Compare the attached source and destination exports using join key order_ref, trimmed of leading and trailing spaces, no case folding. Report rows in each file, distinct keys in each, keys in both, keys only in source, and keys only in destination. For every mapped field in the attached mapping document, classify values as blank, zero, or populated on both sides and list rows where the class differs. Flag any key whose text value loses leading zeros in the destination. Convert timestamps to one reference zone before comparing dates and report any date that shifts. Compare amounts after applying the mapping's unit conversion, and list the three largest absolute differences. List distinct status values from each file, apply the translation table, and report unmapped values in either direction. Produce an Excel workbook with a summary sheet and an exceptions sheet using columns exception_id, join_key, field, source_value, destination_value, check_type, observed_date, status, storing all values as text. State any limitation caused by truncation or missing fields, and do not propose or perform any fix.Try this task
Frequently asked questions
- Can Assistly fix the migrated data or reload it?
No. It compares files against your mapping and documents what it finds. Corrections and reloads run through your migration owner's own approved procedures, with this evidence as their input.
- Why do totals match while the check still reports errors?
Totals absorb individual errors: offsetting mistakes cancel, and a unit mismatch hides inside a converted sum. Per-record comparison after conversion finds a single corrupted row inside clean-looking totals, which is why the largest absolute differences are always listed.
- The file is too large for one pass. What now?
Split by a stable range such as date or key range, run each part, and confirm the parts' row counts add back to the source total. Truncation drops rows from the end silently; a matching total is the evidence nothing was lost.
- How do I compare two versions of the mapping document?
Attach both readable PDFs or DOCX files in one message with the earlier version first, and have the differences in field names, types, and transformations listed. Check the reported changes against the originals, since extracted tables can shift.