Why has fast conversion not meant fast migration?
A converted object is a draft. Before it can replace the original it has to run in the target, run on its schedule, return the same results on the same inputs, and be accepted by the person who owns the numbers. Until that is true for every object, both platforms run and both are paid for.
Programs that begin with an impressive automated conversion often stall here. The converting took days. The checking is the whole estate.
What does a migration have to be?
Four things, and they are linked. Repeatability is what makes testing meaningful, testing is what makes proof possible, and a method whose effort can be predicted is the only kind that can be priced in advance.
| Property | What it means | Why it matters |
|---|---|---|
| Right | Each object returns the same results as the original | Finance and operations run on these numbers |
| Repeatable | The same input gives the same converted code on every run | What was tested is what gets deployed |
| Provable | There is evidence for each object, not a rate for the estate | An auditor signs evidence, not a method |
| Priced | The total is known before work starts | A budget needs a number, not a rate |
Why does warehouse logic resist translation?
Moving warehouse code is not a syntax problem. Two dialects can accept the same statement and return different results. Every difference in the table is one where converted code runs without error.
Each has a known, mechanical answer once it has been recognized. The danger is the conversion that looks right: a date difference that is still called a date difference, a division that still uses a slash.
| Area | Source behavior | Databricks SQL behavior | What goes wrong |
|---|---|---|---|
| Integer division | SQL Server: 5 / 2 returns 2 | 5 / 2 returns 2.5; div gives the integer result | Ratios and allocations shift silently |
| Date differences | SQL Server DATEDIFF in years counts boundaries crossed: 31 December to 1 January is 1 | timestampdiff in years counts whole units elapsed: 0 | Tenure, aging and period logic move by one |
| Empty strings | Oracle treats an empty string as NULL | An empty string and NULL are different values | Filters, joins and counts change |
| String comparison | Teradata compares case-insensitively by default; SQL Server ignores trailing spaces | Comparison is case-sensitive and exact | Joins lose rows; GROUP BY splits groups |
| Duplicate rows | A Teradata SET table silently discards duplicate rows on insert | Tables keep duplicates unless told otherwise | Row counts and sums inflate |
| NULL ordering | Oracle sorts NULLs last in ascending order | NULLs sort first in ascending order | Top-N and window results change |
What sits above the SQL dialect?
Three further layers, each of which carries business logic that is not a query.
- Procedural logic. Stored procedures carry cursors, loops, temporary tables, transactions, error handling and dynamic SQL assembled at run time. The target often has no direct equivalent, so the logic must be restructured, not transliterated: a cursor becomes a set-based operation, an error handler becomes a task condition.
- Orchestration. SSIS packages, BTEQ scripts and agent jobs decide what runs, in what order, and what happens on failure. A BTEQ return code that stops a nightly chain is business logic even though it is not SQL.
- Dependencies. An estate is a graph. A view reads a table that a procedure loads from a staging table that a package fills. An object cannot be judged correct in isolation, because its inputs are other converted objects.
How does a language model convert code, and where does it fail?
A language model converts code by predicting the most likely next token given the text it has been shown. That mechanism has four consequences for migration.
It does not execute anything. The model has no access to the source system’s behavior. It produces code that resembles a correct translation of code that resembles the input. Where two dialects share a function name and differ in meaning, resemblance is exactly the wrong guide.
It sees a window, not an estate. A model is given one object, or a few, at a time. Session settings, collation defaults, the definition of an upstream view and the job that calls the procedure are outside the window unless a tool retrieves them, and retrieval is itself approximate.
Its output is not guaranteed to repeat. Sampling temperature is one cause and can be set to zero. A second cause cannot be controlled on a shared service: hosted models process requests in batches whose size changes with load, and the arithmetic inside the model is not invariant to batch size, so the same request can yield different tokens. Model versions also change, sometimes without notice. Vendors’ own documentation says determinism is not guaranteed.
It is fluent when it is wrong. A wrong conversion is written in the same confident, well-formatted style as a right one, often with a plausible explanation attached.
What are the failure modes, and which checks catch them?
The mechanism produces a recognizable set of failures. Most of them compile, and several survive a careful reading.
| Failure mode | Example | Caught by compiling? | Caught by reading? | Caught by reconciliation? |
|---|---|---|---|---|
| Semantic drift | Division, date, NULL or collation behavior carried over by name | No | Rarely | Yes |
| Invented function or option | A function that exists in another dialect or not at all | Yes | Sometimes | Yes |
| Dropped branch | An error path or rarely used ELSE omitted from a long procedure | No | Sometimes | Only if the inputs exercise it |
| Changed join or filter | An outer join tightened to inner; a predicate moved | No | Sometimes | Yes |
| Type and precision change | DECIMAL widened to DOUBLE; implicit cast removed | No | Rarely | Yes, on aggregates |
| Run-to-run variation | A second run restructures code that had passed | No | No | Yes, if rerun |
What does independent research say about AI code translation?
Published measurements are more cautious than marketing figures. These studies test general code and single SQL queries, not warehouse migration, and they do not measure any vendor’s product. Newer models score higher, and tools built around models add retrieval, tests and retries.
What the studies establish is narrower and more durable: model-written code is often wrong in ways that reading it does not reveal, and the same request does not reliably give the same answer twice.
| Study | What it tested | Finding |
|---|---|---|
| Pan and others, ICSE 2024 | 1,700 code samples translated between five programming languages, checked by execution | Correct translations ranged from 2.1% to 47.3% across the models studied |
| PARROT, NeurIPS 2025 | 598 SQL translation pairs across 22 database systems | Language models average under 38.53% accuracy |
| Atil and others, 2024 | Five models, eight tasks, ten runs each, with settings meant to be deterministic | Accuracy varied by up to 15% between runs |
| Ouyang and others | 829 code-generation problems, the same prompt sent several times | For 47.56% to 75.76% of problems, depending on the benchmark, no two requests gave code with the same test output |
What happens to accuracy at estate scale?
A per-object accuracy that sounds high behaves very differently across an estate. If each object is converted correctly with probability p, independently, the chance that all N objects are correct is p raised to the power N.
Even at 99.9% per object, far above anything in the published studies, an estate of 1,500 objects is more likely than not to contain an error. Some checking of every object is unavoidable. The question is what it costs.
| Per-object accuracy | Expected wrong objects, N = 1,500 | Probability the whole estate is correct |
|---|---|---|
| 90% | 150 | Effectively zero |
| 99% | 15 | About 0.00003% |
| 99.9% | 1.5 | About 22% |
| 99.99% | 0.15 | About 86% |
Why is finding the wrong objects harder than fixing them?
Errors propagate along lineage. A wrong object corrupts everything downstream of it. If a staging transformation is wrong, every table, view and report that reads from it is wrong too, even where their own conversions are correct. Diagnosis has to walk the dependency graph to find the origin.
Then there is the location problem. A pass rate gives the expected number of wrong objects, N × (1 − p). It does not say which. If the wrong objects cannot be located in advance, the number to check is N at every pass rate below 100%, and the checks per defect found, 1 / (1 − p), rise as the tool improves: 10 at 90%, 100 at 99%. Human review degrades in exactly this regime, because reviewers of long runs of correct items miss the rare wrong one.
Automated reconciliation makes the checking cheap for any conversion method, and every serious migration should use it. Two costs remain that depend on the method: the repair loop, and the stability of output between runs.
Why does the shape of the errors matter more than the rate?
Because it decides whether the work converges. A wrong rule sounds worse than an occasional model mistake and is much better: forty failures with one cause are one problem. A method whose remaining work shrinks predictably can be given a date and a price. One whose hundredth fix costs as much as its first can only be estimated.
| Scattered errors | Systematic errors | |
|---|---|---|
| Typical source | A language model, or hand rewrites | A conversion rule that is wrong |
| How failures appear | One at a time, with no shared cause | In groups that share a cause |
| Diagnosis | Once per failed object | Once per faulty rule |
| What one fix repairs | One object | Every object the rule touches, on the next run |
| Effect of a rerun | Objects that had passed can change | Objects that had passed are identical |
| Over the program | Effort per fix stays constant | The open list shrinks by classes |
How does deterministic conversion work?
A rules-based converter treats migration as compilation, not as writing. It has three steps.
Parse to structure. Source code is parsed into a tree that represents its structure and meaning: statements, expressions, types, and the objects it reads and writes. Novuz’s first layer is a semantic parser that builds this model for every object and for the dependencies between objects, across SQL, procedural code, packages and scripts.
Select rules. A rule is a tested transformation with four parts, shown in the table. Note what the rule needs that a text-to-text conversion does not have: the operand types, which come from the semantic model, not from the statement. Novuz’s second layer selects rules from a versioned library and records a confidence score at every decision. The selection is computed, not sampled: the same object and the same library version give the same choice. Where confidence is below threshold or no rule applies, the object is flagged for the resolver. It is not guessed.
Emit native code. The rewritten tree is written out as code native to the target, with schedules and dependencies rebuilt as the target’s own workflows. Nothing in the output depends on a Novuz runtime.
| Part of a rule | What it is | Illustration: SQL Server integer division |
|---|---|---|
| Pattern | The structure it matches | A division where both operands are integer-typed |
| Preconditions | What must be true for it to apply | Types are known from the catalog; no explicit cast present |
| Rewrite | The target structure it produces | The div operator, or a cast, to preserve integer semantics |
| Tests | Inputs and expected outputs that prove it | Positive, negative, zero and NULL operands |
What properties does a rules-based design give?
Four, and about 95% of objects get them: that is the share that converts by rule with no model call. The share is measured on each estate in the assessment, because it varies with the estate’s sources and age.
- Determinism. The same source and the same rule-library version produce identical output. Two runs can be compared directly, so a test of the converted code is a test of what will be deployed.
- Traceability. Every change in the output is attributable to a rule and its version. A reviewer or auditor can ask why a line changed and get an answer that does not depend on anyone’s memory.
- Fix once. Correcting a rule corrects every object it touches on the next run, and the correction carries to every later estate.
- Honest limits. A rule either applies or does not. What the rules cannot settle is reported as a list, which is what makes the remainder small enough to handle with care.
How can a model be used without being trusted?
Some objects have no rule because the right conversion depends on intent the code does not state: dynamic SQL built from table contents, a script task that parses an undocumented file format, a cursor whose result depends on a processing order nobody wrote down. A language model is useful here, because it can read context and propose something sensible. The resolver is the part of Novuz that uses one, under controls that turn a proposal into something safe to deploy.
| Control | What it does | Why it matters |
|---|---|---|
| Narrow trigger | Only objects the rules flagged, or whose reconciliation failed, reach the model | The model’s scope is the remainder, typically about 5% of objects |
| Context package | The model receives the source object, the rule trace showing what converted and what did not, upstream and downstream lineage, and the failed check with the rows that differ | It starts from evidence, not from a bare file |
| Estate knowledge base | Patterns and conventions from the customer’s own estate, held inside the customer’s environment | Proposals follow local conventions; nothing leaves the boundary |
| Model choice | Claude or Gemini under the customer’s own agreement, or a local model through Ollama | The customer controls where code goes, including nowhere |
| Bounded cost | About 700 to 1,000 tokens per resolution | Cost is bounded by the remainder, not the estate |
| Engineer approval | Every proposal is approved, edited or rejected by an engineer; proposal, decision, approver and time are logged per object | Nothing deploys on a model’s say-so |
| Reconciliation gate | An approved proposal faces the same checks as every other object | A plausible but wrong fix is caught before cutover |
If a model handles the edge cases, why not let it convert everything?
Because the controls above work only at small scale. An engineer can read a few dozen proposals with care; nobody can read 1,500 conversions. The context package exists only because the rules have already converted everything around the object. And a model that proposes, under approval and proof, is a different thing from a model that decides.
The two jobs differ in scope, context, role, proof and cost, and none of those is the model. AI proposes. An engineer decides. Reconciliation proves. Rules are used where certainty is needed, and AI where judgment is needed.
How is reconciliation designed?
Reconciliation is the step that turns converted code into evidence. The original object and the converted object are run on the same frozen inputs, and their results are compared in tiers. It applies to every object, however it was converted.
Each object gets a report: what was compared, on which inputs, with what result. The First Domain contract carries a reconciliation threshold, 95% by default, and the fee is waived or credited in full if the result misses it after the cure period. Reconciliation typically runs above 95% on first pass.
| Tier | What is compared | What it catches | What it can miss |
|---|---|---|---|
| 1. Schema | Column names, order, types, precision, nullability | Type and precision changes | Nothing about the data |
| 2. Row counts | Total rows, and rows per key or partition | Dropped or duplicated rows; join and filter changes | Errors that keep the count |
| 3. Aggregates | Per column: sum, min, max, count of NULLs, count of distinct values | Arithmetic, date, NULL and rounding drift | Offsetting errors |
| 4. Row comparison | Full rows matched on key, by hash or set difference | Any cell that differs | Nothing, on the inputs used |
| 5. Business checks | Named totals and reports the owner recognizes | Errors that matter to the business | Depends on the checks chosen |
What makes a reconciliation result trustworthy?
Four design points.
- Frozen inputs. Both versions must read the same data. Inputs are snapshotted, and anything that varies by itself, such as the current date, random functions or sequence values, is pinned.
- Coverage of branches. A check proves a branch only if the inputs exercise it. Inputs should include NULLs, ties, duplicates, mixed case, boundary dates and at least one row that triggers each error path.
- Sampling is not enough. If a fraction f of rows is wrong and k rows are sampled, the chance the sample misses every wrong row is (1 − f) raised to the power k. With one row in a thousand wrong, a sample of 1,000 rows misses the defect about 37% of the time. This is why aggregates and full row comparison come before sampling.
- Stated tolerances. Floating-point results can differ in the last digits between engines. Any tolerance is written down per column, and exact types are compared exactly.
How are orchestration and deployment handled?
An estate that converts and reconciles object by object can still fail as a system if the jobs run in the wrong order or a failure is not handled. Orchestration is converted with the same method as code: package control flow, script return codes, job schedules and dependencies are parsed into the same model and rebuilt as the target’s native workflows, with task conditions standing in for error branches. The converted schedule is then proven the same way as data: run it, force a failure, and confirm the same path is taken.
Novuz runs the whole process inside the customer’s environment and deploys code, schedules and pipelines to the target ready for cutover, domain by domain, so the old platform can be switched off in stages.
What does conversion cost, as a model?
The cost of conversion by a language model can be written as: model cost = N × a × (t_in + t_out) × price per token × (1 + r). N is the number of objects, a the average attempts per object, t_in and t_out the tokens read and written per attempt, and r the number of full or partial reruns over the program. To that is added the cost of locating and repairing wrong objects, and the months both platforms run while that happens.
Only N can be counted before work starts. Attempts depend on how hard the objects turn out to be. Token counts depend on object size and on how much context each attempt needs. Reruns depend on how often the source changes and how many fixes require converting again. This is why usage pricing gives a rate and not a total.
Under rules first, the terms change, as the table shows. On a 1,500-object estate, about 75 objects reach the resolver, for a total in the order of 75,000 tokens. The model’s share of cost is small enough to be absorbed, which is how Novuz sets one fixed price from a three-day assessment, valid for 90 days, that token use never changes. The assessment costs $3,000 and is credited in full against later work.
| Term | Model converts the estate | Rules first |
|---|---|---|
| Objects that use a model | All N | About 5% of N |
| Tokens per object | Set by object size and context | About 700 to 1,000 per resolution |
| Attempts | Unknown in advance | One proposal, reviewed by an engineer |
| Reruns | Each rerun is paid for again | Rule conversion reruns at no model cost |
| Review | Every object, or a risk accepted | The resolver’s proposals |
Where does the software run, and who controls the model?
Inside the customer’s boundary, on a model the customer chooses.
- Novuz runs as a Docker container or virtual machine inside the customer’s environment, with no outbound connection required. Air-gapped installations are supported.
- The resolver runs on a model the customer approves: Claude or Gemini under the customer’s own agreement, or a local model through Ollama for a fully offline setup. Most objects never reach a model at all.
- The estate knowledge base the resolver uses is built from the customer’s code and stays in the customer’s environment.
- Customer code and data are never used to train a model.
- Every model proposal and every approval is logged per object, alongside the rule versions used for everything else.
- Novuz holds no SOC 2 or ISO certification today; SOC 2 Type I is planned. Because the software runs inside the customer’s boundary, the customer’s own controls, logging and access policies apply.
When is AI-led conversion the right choice?
For a few hundred simple SQL objects moving to one platform, where each will be tested by hand, an AI assistant or the target platform’s own tool can be enough and is quick to start. A language model is also a good way to get a first draft of an unusual object, and with reconciliation behind it, a reasonable one.
Rules first earns its place when the estate is large, includes procedures, packages and schedules, and someone has to sign that the numbers match.
How should any tool be evaluated, including Novuz?
With a one-week test on your own code. Record repeatability, proven objects, coverage, traceability, the evidence you receive per object and the total cost.
- Pick 10 to 20 objects, weighted toward the hardest: a long procedure with cursors or dynamic SQL, a package with a script task, a script whose control flow drives a schedule.
- Freeze a set of inputs for each, including NULLs, ties, boundary dates and an error path.
- Convert every object twice with each tool, and compare the two runs.
- Reconcile each converted object against the original on the frozen inputs, through all five tiers.
- Count every manual edit. A one-line fix counts.
- Record the full cost: fees, model usage, retries and your own review time.
- Ask for the final price for the whole estate in writing, and what it covers.
What is the evidence from delivery?
Customers are described, not named, until each gives written permission. An object counts as automated only if it needs no manual edit; a one-line fix counts as manual.
- Three enterprise migrations commissioned by Databricks, delivered by Novuz as a validated technology partner.
- A media analytics company moved from Snowflake to Databricks in six weeks, with zero defects after go-live and a 44% lower annual platform bill. A program planned for six months closed in two.
- A business news company moved 1,600 objects and 59 billion rows in four weeks, with 98% reconciled on the same inputs.
- Typically 95% or more of objects are converted with no manual edit, and estates of 1,000 to 1,600 objects typically take 4 to 8 weeks.
What are the limits of this paper?
It is written by a vendor, and it argues for the method that vendor uses. The research it cites tests general code and single SQL queries, not warehouse migrations, and the models tested have been superseded. The arithmetic in the scale and cost sections is a model with stated assumptions, not a measurement, and the rule shown is an illustration of the form of a rule.
The claims that can be checked should be: run the two-run test and the reconciliation on your own objects, with any tool, and judge by the results.
Sources
- Pan, R. and others, “Lost in Translation: A Study of Bugs Introduced by Large Language Models while Translating Code”, ICSE 2024, arXiv:2308.03109
- “PARROT: A Benchmark for Evaluating LLMs in Cross-System SQL Translation”, NeurIPS 2025
- Atil, B. and others, “Non-Determinism of ‘Deterministic’ LLM Settings”, arXiv:2408.04667
- Ouyang, S., Zhang, J. M., Harman, M. and Wang, M., “An Empirical Study of the Non-determinism of ChatGPT in Code Generation”, arXiv:2308.02828
- Novuz research note, “Why AI code conversion is hard to audit”, November 2026
- Novuz case studies and delivery record

