AI-Assisted Migration: Lakebridge plus LLMs With a Human Gate
Lakebridge’s transpiler handles the mechanical 80% of a migration; the Procedure Autopsy work in the last two sections handles the tangled procedural 20% that a rule-based converter can’t touch – and that’s exactly the territory where teams now point a general-purpose LLM directly at a stored procedure for a first-draft PySpark translation. It’s genuinely fast, and it is also the point in a migration where a plausible-looking wrong answer is easiest to ship by accident. This section builds the operating discipline that keeps that speed safe: prompts structured to close off the model’s room to guess, three named failure patterns – a window-function swap, a gallery of NULL/date/padding mismatches, and a transaction-boundary redesign – worth recognizing on sight, and a versioned prompt library with a six-point audit gate that turns careful review into a repeatable checklist.
flowchart TD
A["PL/SQL block\n(from the Procedure Autopsy worksheet)"] --> B["Four-block prompt\nContext / Contract / Constraints / Self-Audit"]
B --> C["LLM draft PySpark\n(pinned model version)"]
C --> D{"Six-point gate audit"}
D -->|"Row count / golden diff fails"| E["Reject --\nrevise prompt"]
D -->|"Window-function, NULL, or\ndate invariant fails"| E
D -->|"Transaction redesign\nundocumented"| E
D -->|"All six checks pass"| F[("Reviewed PySpark,\nmerged to production")]
E --> G["Versioned prompt library\n(git, YAML, pinned model)"]
G --> B
F --> G
Lectures
| # | Lecture | Est. Read |
|---|---|---|
| 1 | The Hybrid Model: 80% AI Speed plus 20% Human Accuracy | 3 min read |
| 2 | Writing Effective PL/SQL to PySpark Transpilation Prompts | 3 min read |
| 3 | The Window-Function Hallucination | 3 min read |
| 4 | Syntactically Valid, Semantically Wrong | 4 min read |
| 5 | The Transaction-Semantics Gap | 3 min read |
| 6 | The LLM Prompt Library and Audit Checklist | 3 min read |
| 7 | Check Your Knowledge | Quiz |
| ← Previous: Check Your Knowledge | Next: The Hybrid Model: 80% AI Speed plus 20% Human Accuracy → | |:—|—:|