ContentsPrinciples
2AI data migration
5Lifecycle
7Playbooks
Guide · Principles
Principles
31 principles, in six groups.
The aim
Target-driven
Start from the target. Shape everything to fit it.
WhyThe target decides what can load. The source only decides what is available. Work from the source, and you build things that the target cannot take.
The page→Visibility
Show the runs, the counts and the open problems to everyone on the project.
WhyA migration that is closed to view is hard to trust and hard to steer. Open counts and open problems let the project decide early, while there is still time.
The page→Explained variance
Give every row that did not load a reason. Then it is accepted, or it is solved.
WhyA perfect load costs more than it is worth. A load where every gap is explained and decided is one that the business can sign.
The page→Plug a gap, and flag it
A plug is one way to solve a gap: a corrective record in the place of a missing one. Flag it.
WhyA record that is gone leaves a gap, and the gap makes other things fail. A plug stops the leak. Because it is flagged, it can be found and counted.
The page→Least effort, by value
Migrate what earns its place. Give each kind of data a depth: for reference, carry forward, or fully live.
WhyEach table that you migrate must be mapped, tested and reconciled. Data that nobody will use costs as much as data that they will.
The page→The business's view is the truth
Count what the business sees in the application, not what is in the database.
WhyA database holds rows that the application hides, such as deleted, old and broken records. The business signs off on what it can see, so that is the number to match.
From the field1,000 customers in the database. 950 in the application and its reports. To migrate all 1,000 because they are in the database is wrong.
The page→The way of working
Repeatability
Every run is the same process, from start to end.
WhyA cutover is run once. A process that has run the same way many times is far more likely to run that way on the night.
The page→Learn the pattern first
Migrations follow a known pattern. Learn it before you build.
WhyA team that invents its own way loses time on problems that are already solved: where to stage the data, how to keep the mappings, and how to run a load again.
The page→Freeze the code, not the lookups
Lock the code when it is tested. Let the mappings keep changing.
WhyA change to code needs the code tested again. A change to a mapping does not: the rows are checked again on every run. Keep the two apart, and the business can keep mapping late in the project while the tested code stays tested.
From the fieldTest the juicer, not every orange. Test the process one time. Do not test each record by hand.
The page→Validate before you load
Check every row against the target before you send it.
WhyA failure that is found before the load costs minutes. The same failure found during the load costs hours, on a night when you have none to spare.
From the fieldA load ran for 20 hours. Then it showed 15,000 failures. Each one could have been found before the load started.
The page→The machine has a set-up cost
Small volumes go in by hand.
WhyEach table that goes through the migration costs a mapping, a test and a reconciliation. For a few records, twenty for example, it is usually cheaper to type them, with a second person to check.
ScenarioTwenty customers: type them in. You do not book a removal truck for two boxes.
The page→All work accumulates
Keep every mapping, rule, decision and script in the project.
WhyA migration can run for months, and people change. What is written down in the project is there for the next run. What is in a person's head is not.
The page→Flexibility
Built for change
Expect the scope, the rules and the mappings to change.
WhyThe scope changes on almost every migration. A solution that must be rebuilt for each change falls behind.
The page→One change, one place
Build each part so that a change to it does not break another.
WhyIf you cannot trust that a small change stays small, then every change needs a full retest. In practice, either the changes stop or the testing does.
The page→Room for the hard cases
Some tables need a real transformation: many tables in, one out. Leave room for it.
WhyMost fields map one to one. The hard ones do not. A solution that only does the simple case fails on the hard part.
The page→Not a hard rule
Use the pattern where it helps. Leave it where it does not.
WhyA pattern is there to save work. A list of two values in its own mapping table is more work than to write it in the code.
The page→Structure where it is needed
Fix the parts that are the same on every table. Leave the transformation free.
WhyCounts, keys, logs and checks are the same on every table, so they can be standard. What a value becomes differs from table to table, and it needs judgement.
The page→It scales with the job
Use as much of this as the job needs.
WhyOne person on a small migration and a large team on a big one follow the same pattern, at different weights. Process that a small job does not need only slows it down.
The page→The people
The migration boundary
The migration moves data into the target. It does not design the target.
WhyA source field with nowhere to go is a gap in the new system, not a migration problem. If the migration team fills the gap quietly, nobody owns the decision.
The page→Where a fix belongs
For each data problem, agree where it is solved: in the source, in the migration, with a plug, or by hand after go-live.
WhyThe place decides who owns the change. A balance or a figure is corrected by the business in the source, where the source allows it. Where it does not, the business chooses a plug, or it accepts the gap.
The page→Ownership of the role
One person owns how the migration is done.
WhyA migration is a chain of small decisions. When each one must be argued with someone else, the work stalls, and nobody answers for the result.
The page→The tool
The tool enables. The method advises
The tool warns. It does not stop you.
WhyThe person on the job knows things that the tool cannot know. A tool that blocks them gets worked around. A tool that warns keeps them informed and in charge.
The page→No database server
The migration runs from a folder of files on one machine. It needs no server.
WhyA server must be installed, secured and run by someone. With no server, a migration can start in an hour, and it can be copied, kept and run again anywhere.
The page→AI
AI writes. The engine runs
The AI writes the SQL. The engine on your machine runs it.
WhyAI is good at writing code. It is poor at doing one thing a million times in exactly the same way. So the AI does the writing, and the database engine on your machine does the work.
The page→No customer data to the AI
Give the AI the shape of the data, not the records.
WhyTo write a transformation, an AI needs the column names, the types, the counts and the distinct values of a code. It does not need the name of a customer. What you do not send cannot leak.
The page→Pay for thinking, not for rows
The cost of the AI is for the script, not for the volume.
WhyAI is charged by the word. A script is a few hundred words, for ten rows or for ten million.
The page→AI is not consistent
Keep what the AI wrote as a file, and run the file.
WhyAsk an AI twice, and you can get two answers. The file does the same thing on every run.
The page→The AI proposes. A person decides
A person approves each decision that matters.
WhyAn AI can be wrong and sound certain. What a value means is decided by the business. What is in scope, and when to go live, are decided by the project. Each decision has a name against it.
The page→See what the AI built
Run what the AI wrote, and look at the result.
WhyCode that you have not seen run is a guess. Fields that fill show that the mapping connects. Empty fields show at once where it does not. Neither shows that a value is right: the checks do that.
The page→AI-driven, and human-drivable
A person can do everything that the AI does, without it.
WhyNot every site allows AI, and AI is not always right. Work that only the AI can do stops when the AI does.
The page→One guide for both
The AI works from the same guide that people read.
WhyTwo sets of instructions drift apart. With one set, the AI follows the method that the team agreed, and people can check that it did.
The page→Click a card.
The same picture, as text
THE AIM
· Target-driven
· Visibility
· Explained variance
· Plug a gap, and flag it
· Least effort, by value
· The business's view is the truth
THE WAY OF WORKING
· Repeatability
· Learn the pattern first
· Freeze the code, not the lookups
· Validate before you load
· The machine has a set-up cost
· All work accumulates
FLEXIBILITY
· Built for change
· One change, one place
· Room for the hard cases
· Not a hard rule
· Structure where it is needed
· It scales with the job
THE PEOPLE
· The migration boundary
· Where a fix belongs
· Ownership of the role
THE TOOL
· The tool enables. The method advises
· No database server
AI
· AI writes. The engine runs
· No customer data to the AI
· Pay for thinking, not for rows
· AI is not consistent
· The AI proposes. A person decides
· See what the AI built
· AI-driven, and human-drivable
· One guide for bothThe aim
- Target-drivenStart from the target. Shape everything to fit it.WhyThe target decides what can load. The source only decides what is available. Work from the source, and you build things that the target cannot take.
- VisibilityShow the runs, the counts and the open problems to everyone on the project.WhyA migration that is closed to view is hard to trust and hard to steer. Open counts and open problems let the project decide early, while there is still time.
- Explained varianceGive every row that did not load a reason. Then it is accepted, or it is solved.WhyA perfect load costs more than it is worth. A load where every gap is explained and decided is one that the business can sign.
- Plug a gap, and flag itA plug is one way to solve a gap: a corrective record in the place of a missing one. Flag it.WhyA record that is gone leaves a gap, and the gap makes other things fail. A plug stops the leak. Because it is flagged, it can be found and counted.
- Least effort, by valueMigrate what earns its place. Give each kind of data a depth: for reference, carry forward, or fully live.WhyEach table that you migrate must be mapped, tested and reconciled. Data that nobody will use costs as much as data that they will.
- The business's view is the truthCount what the business sees in the application, not what is in the database.WhyA database holds rows that the application hides, such as deleted, old and broken records. The business signs off on what it can see, so that is the number to match.
1,000 customers in the database. 950 in the application and its reports. To migrate all 1,000 because they are in the database is wrong.
The way of working
- RepeatabilityEvery run is the same process, from start to end.WhyA cutover is run once. A process that has run the same way many times is far more likely to run that way on the night.
- Learn the pattern firstMigrations follow a known pattern. Learn it before you build.WhyA team that works out its own way has to solve again what is already solved: where to stage the data, how to keep the mappings, and how to run a load again.
- Freeze the code, not the lookupsLock the code when it is tested. Let the mappings keep changing.WhyA change to code needs the code tested again. A change to a mapping does not: the rows are checked again on every run. Keep the two apart, and the business can keep mapping late in the project while the tested code stays tested.
- Validate before you loadCheck every row against the target before you send it.WhyA failure that is found before the load costs minutes. The same failure found during the load costs hours, on a night when you have none to spare.
- The machine has a set-up costSmall volumes go in by hand.WhyEach table that goes through the migration costs a mapping, a test and a reconciliation. For a few records, twenty for example, it is usually cheaper to type them, with a second person to check.
- All work accumulatesKeep every mapping, rule, decision and script in the project.WhyA migration can run for months, and people change. What is written down in the project is there for the next run. What is in a person's head is not.
Test the juicer, not every orange. Test the process one time. Do not test each record by hand.
A load ran for 20 hours. Then it showed 15,000 failures. Each one could have been found before the load started.
Twenty customers: type them in. You do not book a removal truck for two boxes.
Flexibility
- Built for changeExpect the scope, the rules and the mappings to change.WhyThe business learns what its data holds as the runs show it, so the scope and the rules can change late. A solution that must be rebuilt for each change falls behind.
- One change, one placeBuild each part so that a change to it does not break another.WhyIf you cannot trust that a small change stays small, then every change needs a full retest.
- Room for the hard casesSome tables need a real transformation: many tables in, one out. Leave room for it.WhyMost fields map one to one. The hard ones do not. A solution that only does the simple case fails on the hard part.
- Not a hard ruleUse the pattern where it helps. Leave it where it does not.WhyA pattern is there to save work. A list of two values in its own mapping table is more work than to write it in the code.
- Structure where it is neededFix the parts that are the same on every table. Leave the transformation free.WhyCounts, keys, logs and checks are the same on every table, so they can be standard. What a value becomes differs from table to table, and it needs judgement.
- It scales with the jobUse as much of this as the job needs.WhyOne person on a small migration and a large team on a big one follow the same pattern, at different weights. Process that a small job does not need only slows it down.
The people
- The migration boundaryThe migration moves data into the target. It does not design the target.WhyA source field with nowhere to go is a gap in the new system, not a migration problem. If the migration team fills the gap quietly, nobody owns the decision.
- Where a fix belongsFor each data problem, agree where it is solved: in the source, in the migration, with a plug, or by hand after go-live.WhyThe place decides who owns the change. A balance or a figure is corrected by the business in the source, where the source allows it. Where it does not, the business chooses a plug, or it accepts the gap.
- Ownership of the roleOne person owns how the migration is done.WhyA migration is a chain of small decisions. When each one must be argued with someone else, the work stalls, and nobody answers for the result.
The tool
- The tool enables. The method advisesThe tool warns. It does not stop you.WhyThe person on the job knows things that the tool cannot know. A tool that blocks them leaves only a way around it, which nobody sees. A tool that warns keeps them informed and in charge.
- No database serverThe migration runs from a folder of files on one machine. It needs no server.WhyA server must be installed, secured and run by someone. With no server, a migration can start in an hour, and it can be copied, kept and run again anywhere.
AI
These eight principles say how to use an AI on a migration: what it writes, what it must not be given, and what stays with a person.
See how it is done with Convago→- AI writes. The engine runsThe AI writes the SQL. The engine on your machine runs it.WhyAI is good at writing code. It is poor at doing one thing a million times in exactly the same way. So the AI does the writing, and the database engine on your machine does the work.
- No customer data to the AIGive the AI the shape of the data, not the records.WhyTo write a transformation, an AI needs the column names, the types, the counts and the distinct values of a code. It does not need the name of a customer. What you do not send cannot leak.
- Pay for thinking, not for rowsThe cost of the AI is for the script, not for the volume.WhyAI is charged by the word. A script is a few hundred words, for ten rows or for ten million.
- AI is not consistentKeep what the AI wrote as a file, and run the file.WhyAsk an AI twice, and you can get two answers. The file does the same thing on every run.
- The AI proposes. A person decidesA person approves each decision that matters.WhyAn AI can be wrong and sound certain. What a value means is decided by the business. What is in scope, and when to go live, are decided by the project. Each decision has a name against it.
- See what the AI builtRun what the AI wrote, and look at the result.WhyCode that you have not seen run is a guess. Fields that fill show that the mapping connects. Empty fields show at once where it does not. Neither shows that a value is right: the checks do that.
- AI-driven, and human-drivableA person can do everything that the AI does, without it.WhyNot every site allows AI, and AI is not always right. Work that only the AI can do stops when the AI does.
- One guide for bothThe AI works from the same guide that people read.WhyTwo sets of instructions drift apart. With one set, the AI follows the method that the team agreed, and people can check that it did.