Novuz

Blog

How to run a fair bake-off between migration tools

By Ted Ghose, Co-founder and CTO · Published · 11 minutes read

The short answer

Pick 10 to 20 of your hardest objects, freeze a set of inputs, and have each tool convert them twice. Compare the two runs, reconcile each converted object against the original on the frozen inputs, count every manual edit, record the cost including retries, and ask each vendor for the final price for your whole estate in writing. Score on proof and total cost, not on how fast the first draft appeared.

Every migration tool demos well. The demo runs on code the vendor chose, and the easy 80% of any estate converts cleanly with almost anything.

A bake-off runs on your code, on the objects you are actually worried about. This one takes about a week, needs no special tooling, and works the same whether the tool is a rules engine, an AI converter or a team of contractors. We would rather be judged by it than by a slide.

Step by step

Eight steps. The order matters: freeze the inputs before anyone converts anything.

  1. Pick the objects. Choose 10 to 20, weighted toward the hard ones: a long stored procedure with cursors or dynamic SQL, an ETL package with a script task, a script whose control flow drives a schedule, and a job with dependencies. Add two or three ordinary ones as a control.
  2. Freeze the inputs. Take one fixed set of input data for each object, including the awkward rows: NULLs, ties, duplicates, boundary dates and at least one row that triggers an error path.
  3. Convert twice. Have each tool convert every object two separate times, and keep both outputs.
  4. Compare the two runs. An identical second run means the method is repeatable. A different one means every output needs its own review, every time.
  5. Reconcile. Run the original and each converted object on the frozen inputs and compare schema, row counts, column totals and sampled rows. Mark each object pass or fail.
  6. Count the manual edits. Record every change a person made to get an object to pass. Count a one-line fix as manual.
  7. Record the cost. Include retries, reruns, model usage and the hours your own people spent reviewing.
  8. Ask for the price. Have each vendor give the final number for your whole estate, in writing, and say what it covers.

Which objects to pick, and what each one tests

Choose objects for the failure they can expose, not for how typical they are.

ObjectWhat it testsWhat a weak conversion does
A procedure with a cursor or loopRestructuring row-by-row logic into set operationsTransliterates the loop, or changes the result when order matters
Dynamic SQL built at run timeHonesty about what cannot be converted mechanicallyConverts the string-building and leaves the generated SQL in the old dialect
Arithmetic and datesDialect semantics: integer division, date differences, roundingKeeps the function name and changes the result
String joins and groupingCollation, case sensitivity, trailing spaces, empty stringsLoses rows in joins or splits groups
An ETL package with a script taskCode embedded in another language, and control flowConverts the data flow and drops the script
A script whose return code drives a scheduleOrchestration as business logicConverts the SQL and loses the failure path
A long procedure with error handlingCompleteness over hundreds of linesOmits a rarely used branch

How to reconcile: the checks, in order

Run the original and the converted object on the frozen inputs and compare the outputs in tiers. Each tier is cheap, and each catches what the one before it cannot. The queries below are a minimal version; run the first on both sides and compare, and run the second in both directions.

-- Counts and aggregates: run on each side, compare the two result rows
SELECT count(*)                          AS row_count,
       sum(amount)                       AS sum_amount,
       min(order_date)                   AS min_date,
       max(order_date)                   AS max_date,
       count(*) - count(customer_id)     AS null_customer_ids,
       count(DISTINCT customer_id)       AS distinct_customers
FROM   orders_output;

-- Row comparison: rows in one output and not the other
SELECT * FROM orders_output_original
EXCEPT ALL
SELECT * FROM orders_output_converted;

Use EXCEPT ALL, not EXCEPT, so that a duplicated row counts as a difference. Compare exact types exactly, and write down any tolerance you allow on floating-point columns. An object passes only when schema, counts, aggregates and rows all match.

How to freeze the inputs

A comparison means nothing if the two sides read different data.

  • Snapshot the input tables once, and point both the original and the converted object at the snapshot.
  • Pin whatever changes by itself: the current date and time, random functions, sequence and identity values.
  • Add rows for the risky cases if the data lacks them: NULLs in keys and measures, ties in sort columns, duplicates, mixed case, trailing spaces, 29 February and 31 December.
  • Include at least one input that triggers each error path, and compare what happens next, not just the output table.

The scorecard

Score every tool on the same seven lines.

MeasureWhat to recordWhy it matters
RepeatabilityObjects whose two runs are identicalWhat you test is what you deploy
Proven objectsObjects that reconcile with no manual editThe real automation rate
Manual editsCount, and hours spentThe work the tool left for you
CoverageObject types the tool declined or skippedWho converts those, and at what price
EvidenceWhat you receive per objectWhat your auditor will be shown
Total costFees, usage, retries and your review timeThe number the budget sees
Price for the estateFixed, in writing, and what it includesWho carries the risk of hard objects

Reading the difference between two runs

When you compare a tool’s two runs, normalize formatting first, then sort what remains into three kinds.

Difference between runsWhat it meansWhat to do
NoneThe method is repeatable for this objectTest once; the proof holds for later runs
Cosmetic: aliases, ordering of clauses, commentsThe method is not repeatable, though this run may be equivalentReconcile both; expect to reconcile every future run
Structural: a different join, filter, function or branchTwo different programs were produced from one inputReconcile both, and ask which one would have been deployed

Cosmetic differences are easy to wave away. They matter because they tell you the third kind is possible, and that nothing you verify today is guaranteed to be what runs next month.

Three ways bake-offs go wrong

Most disappointing bake-offs fail in one of three ways.

  • Letting the vendor pick the objects. The hard ones are the test. If a tool declines an object type, that is a result; write it down.
  • Judging by reading the code. Converted code can compile and read well and still return different numbers. Only the comparison on the same inputs counts.
  • Scoring speed to first draft. The first draft is the cheap part. Measure the time until an object is proven.

What we expect you to find

We are a vendor, so weigh this accordingly. In our experience, AI converters do well on the ordinary objects and produce a fast, readable first draft of the hard ones, and the second run and the reconciliation are where the differences show.

Rules-based conversion gives the same output on both runs, and flags what it cannot settle. Where a language model helps is on those flagged objects, with an engineer approving each proposal. That is how Novuz works, and the bake-off is the fairest way we know to check it.

Key terms

Bake-off
a side-by-side test of tools on the buyer’s own code and data, scored on the same measures.
Frozen inputs
one fixed data set per object, used for both the original and every converted version, so results can be compared.
Automation rate
the share of objects that pass reconciliation with no manual edit. A one-line fix counts as manual.

FAQ

Frequently asked questions

How do we compare an AI migration tool with a rules-based one?

On your own code. Pick 10 to 20 hard objects, freeze the inputs, convert each twice with each tool, reconcile every output against the original, count the manual edits and compare the total cost and the written price for the estate.

How many objects does a migration proof of concept need?

Ten to twenty is enough to show repeatability, proof and manual effort, if they are weighted toward your hardest objects and include a few ordinary ones as a control.

What is the two-run test?

Convert the same object twice and compare the outputs. Identical outputs mean the method is repeatable; different outputs mean each one needs its own review.

Will Novuz take part in a bake-off?

Yes. Convert 10 is built for it: ten of your objects, converted and reconciled within 24 hours, free and under NDA.

Sources

  • How to evaluate a data warehouse migration tool (novuz.com/guides/evaluate-data-warehouse-migration-tools)
  • Research note: why AI code conversion is hard to audit (novuz.com/blog/research/ai-code-conversion-nondeterminism)
  • Research note: validating a data migration, methods compared (novuz.com/blog/research/data-migration-validation-methods-compared)

About the author

Ted Ghose is co-founder and CTO of Novuz Inc., the deterministic data warehouse modernization company based in Danville, California. He built the Novuz conversion engine and was previously a Cisco principal engineer.

Next step

Use Convert 10 as your Novuz entry in the bake-off: ten objects, converted and reconciled within 24 hours, free and under NDA.

Last reviewed:

Find out what your logic debt is costing you.

Every object counted, lineage, dead code and a fixed price in three business days. $3,000, credited.

Take the logic debt scorecard

Not sure which door? The scorecard takes ten minutes and tells you.

Scorecard