ContentsThe pattern
2AI data migration
5Lifecycle
7Playbooks
Guide · The pattern
Checks, counts and totals
Each row is checked before it is loaded, each row is counted, and the totals are compared with figures that the business states. Together the three show whether a load can be trusted.
Also called "validation rules" for the checks · "rejects" or "exceptions" for the rejected rows · "row-count reconciliation" · "control totals". Terminology→
A row that breaks a rule gets a finding, with the rule and what to do.
informationwarningerror
Only an error rejects the row.
Rows in scope = rows loaded + rows rejected.
45,000 = 44,800 + 200
The count closes.
Receivables in the old system, from the business's report2,400,000
Receivables that the migration loaded2,399,000
The difference: explained, or solved1,000
From a count to a row
150The payment term has no mapping.
40The postcode is missing.
10The customer number is there twice.
Key in the sourcecustomer C-10482
Payment termPP
What is wrongThe term has no mapping.
What to doThe business maps the term PP.
One fix, many rows. One decision on the term PP clears the 150 rows at the next run.
The same picture, as text
THREE WAYS TO KNOW THE LOAD, in an example
CHECKS each row, against a rule a row that breaks a rule gets a finding, with the rule and what to do
information · warning · error only an error rejects the row
COUNTS each table, on every run rows in scope = rows loaded + rows rejected
45,000 = 44,800 + 200
TOTALS a figure that the business states receivables in the old system, from the business's report 2,400,000
receivables that the migration loaded 2,399,000
the difference: explained, or solved 1,000
FROM A COUNT TO A ROW
45,000 rows in scope 44,800 loaded · 200 rejected
│
200 rejected, by cause 150 the payment term has no mapping
│ 40 the postcode is missing
│ 10 the customer number is there twice
│
150 rows of one cause customer C-10482 · customer C-10977 · customer C-11203 · and 147 more
│
one row customer C-10482 · payment term PP · the term has no mapping
what to do: the business maps the term PP
One decision on the term PP clears the 150 rows at the next run.An AI writes the checks from the rules of the target, runs them, and reports what they found, grouped by cause. The migration team and the business decide which findings matter, and the business states the totals. A person can write and run the same checks with no AI.
See how it is done with Convago→Why
- Before the loadCheck each row against the rules of the target before it is sent.WhyA row that the target refuses during the load is found late, one error at a time, on a night when there is little time. The same row checked beforehand is found in minutes, with every other row that has the same fault.
- Flagged, not droppedKeep a row that fails where it is, and flag it with its reason.WhyA row that is filtered out leaves no trace. The count then looks complete when it is not, and it is hard to say which rows are missing or why.
- Three levelsGive each rule a level: information, warning or error.WhyIf every finding rejects its row, little is left to load, and the only way to load more is to weaken the rules. If no finding rejects a row, the checks protect nothing. Levels let a rule say how much it matters.
- What to doHave each rule say what is wrong and what to do about it.WhyA finding that only a developer can read sends every question back to the developer. A finding in plain words can go straight to the person who can fix it, who is often in the business.
- A count that closesCount on every run: rows in scope, rows loaded, rows rejected.WhyA count that closes shows that no row was lost or doubled between the source and the target. Without it, a load can finish with no error and still be short.
- Totals from outsideCompare the totals with figures that the business states from its own reports.WhyA count shows that the rows arrived. It does not show that they are right: if a rule is wrong, every row that it touches loads wrong, and the counts still agree. A figure that comes from outside the migration can disagree with it, and that is why it is worth having.
The count for open invoices closes, and in this run no row was rejected. The receivables that loaded come to 2,399,000, and the report of the business says 2,400,000. The difference of 1,000 leads to a rule that rounds one kind of invoice the wrong way. The counts agreed all along. The total found the fault.
How
- Start with the target's rulesTake what the target requires of each field, such as a mandatory value, a maximum length or a list of allowed values, and make each one a check. Then add the rules of this job.
- Stack the checksRun many small rules, and not one large one. Each rule finds one fault and names it.
- Reject only on an errorA warning and a piece of information are shown, and the row still loads. The migration team proposes the level of each rule, and the business agrees it.
- Group by causeShow what the checks found by cause, the largest first. In the example, 200 rejected rows are 3 faults.
- From the count to the rowLet a person go from any count to the cause, then to the rows, then to one row with its key in the source. The way down also shows what one fix is worth: in the example, one decision on a payment term clears 150 of the 200 rows. A figure that leads nowhere is hard to act on.
- Keep the counts of every runRecord the rows in scope, the rows loaded and the percent for each run, and show them together. The history then shows whether the load is getting better.
- State each total with its sourceRecord the figure that the business gave, and the report and date that it came from. Show beside it what the migration worked out.
- A plug for a lost recordWhen the cause of a difference is known and the missing record is gone, the business can choose a plug: one corrective row, also called a balancing row, that closes the gap. A plug is always flagged.
- Fix at the source firstA fault in the source data is best fixed by the business in the old system, and the fix arrives with the next extract. The fixing goes on until the last extract. Where the old system does not allow the fix, explained variance gives the other ways.
- The business reconciles tooThese checks and totals are the migration team's evidence that the load did what was built. The business reconciles separately, in the application and with its own reports, and its sign-off rests on that.
More
- The pattern: the flagged rows, and the count that closes.
- Explained variance: what to do with the rows that were rejected.
- Value mapping
- Plugs
- The scoreboard