Check Your Knowledge
Test your understanding of this section’s AI-assisted migration concepts before moving on.
- In the hybrid model this section introduces, what does the “20% human accuracy” half actually consist of?
- A. Rewriting every AI-drafted translation from scratch by hand
- B. A structured review discipline – prompts, named failure checks, and a formal audit gate – applied to AI output
- C. Waiting for a newer model version to fix the errors automatically
- D. Disabling AI assistance entirely for procedural code
- Which of the four required blocks in a deterministic transpilation prompt asks the model to flag its own uncertainty?
- A. Context
- B. Contract
- C. Constraints
- D. Self-Audit
- Why does “pinning the model” matter for a transpilation prompt?
- A. It makes the prompt shorter
- B. It ensures a rerun of the same prompt later produces a comparable result instead of silent drift from a model update
- C. It is required by Databricks licensing
- D. It prevents the model from reading the schema
- In the window-function hallucination, what specifically goes wrong when an LLM substitutes
DENSE_RANK()for a source procedure’sRANK()?- A. The query fails to compile
- B.
DENSE_RANK()’s gap-free numbering can let a different set of rows pass arank <= Nfilter thanRANK()would have - C.
DENSE_RANK()runs but always returns zero rows - D. The two functions are fully interchangeable with no behavioral difference
- What invariant helps detect that
DENSE_RANK()produced a migrated result, whether or not that was intended?- A. The row count always doubles
- B. The maximum rank value in a partition equals the count of distinct ranked values in that partition
- C. The minimum rank value is always zero
- D. Every partition has exactly one row
- In the “Syntactically Valid, Semantically Wrong” gallery, why does a naive Oracle
DATE→ SparkDATEmapping lose information?- A. Spark’s
DATEtype stores more precision than Oracle’s - B. Oracle’s
DATEalways carries a time-of-day component that Spark’s timelessDATEtype has no way to hold - C. Oracle does not support a
DATEtype - D. The mapping causes a compile error, so it’s caught immediately
- A. Spark’s
- Why does an Oracle
CHAR(n)to SparkSTRINGport risk silently breaking a join?- A.
STRINGcolumns cannot be used in joins - B. Oracle blank-pads and ignores trailing spaces in comparisons; Spark’s
STRINGdoes neither, so a value that matched before may not match after - C. Oracle
CHARcolumns cannot hold text data - D. Spark automatically trims all string columns before joining
- A.
- In the transaction-semantics gap example, what is the correct redesign for an Oracle cursor loop that commits every hundred rows?
- A. Reproduce a per-hundred-row commit checkpoint literally in PySpark
- B. Replace the row-by-row commit loop with a single atomic
MERGE INTOkeyed on the record’s natural key - C. Remove all commit logic and let the table stay in whatever state the job leaves it
- D. Run the procedure twice and compare results
- Why must a redesigned transaction boundary (like the one in question 8) be explicitly documented rather than shipped silently?
- A. Documentation is a compliance requirement unrelated to correctness
- B. It changes real failure semantics – from partial-batch commits to all-or-nothing – which stakeholders need to know about
- C. Delta Lake requires a comment above every
MERGEstatement - D. It has no actual effect on behavior, so documentation is just good practice
- What does the six-point gate audit consider a “partial pass” – for example, five of six checks succeeding?
- A. Acceptable, since most checks passed
- B. A full fail – the golden-diff and other checks are binary pass/fail, not partial credit
- C. Grounds for shipping with a follow-up ticket
- D. Irrelevant, since only check 1 (row-count parity) actually matters
Answer Key
- B – The human-accuracy half is the review discipline itself: structured prompts, named failure-mode checks, and a formal audit gate, not manual rewriting or waiting for a better model.
- D – The Self-Audit block asks the model to list its own assumptions and flag constructs it’s uncertain about.
- B – Pinning the model version makes a later rerun of the same prompt comparable rather than silently different due to an underlying model update.
- B –
DENSE_RANK()’s gap-free numbering can admit a different set of rows through arank <= Nfilter thanRANK()’s gapped numbering would, with no error raised. - B –
DENSE_RANK()’s maximum value in a partition always equals the count of distinct ranked values; this equality breaking is the signRANK()(with a tie) was actually intended. - B – Oracle’s
DATEtype always carries a time-of-day component; Spark’s timelessDATEtype silently discards it on a naive mapping. - B – Oracle’s
CHAR(n)blank-pads and ignores trailing spaces in comparisons; Spark’sSTRINGdoes neither, so previously-matching values can fail to match. - B – The correct move is a deliberate redesign to a single atomic
MERGE INTOon the natural key, not a literal translation of the per-row commit loop. - B – The redesign changes real failure semantics (partial-batch vs. all-or-nothing), which is a decision stakeholders need to be told about, not discover later.
- B – The six-point audit treats each check as binary; a golden-diff mismatch or any other failed check is a full fail regardless of how many other checks passed.
| ← Previous: The LLM Prompt Library and Audit Checklist | Next: The Ingestion Decision Tree → | |:—|—:|