Example workflow: Fix conversion issues in all code objects with Gemini assistance
Stay organized with collections
Save and categorize content based on your preferences.
In this example scenario, you convert SQL Server code and schema where multiple
code objects use the same SQL Server function that causes conversion issues.
The rule-based conversion engine can't find a PostgreSQL equivalent
for that function, so you need to fix the conversion issues yourself.
To speed up the conversion process, you use Gemini conversion
assistance to find out how to change the SQL Server code.
Your SQL code and schema are stored in the region where you create the
conversion workspace. If you use assisted code and schema conversion with
Gemini models, your code and schemas might be processed in
other regions.
In your Gemini-powered workflow, you follow these steps:
You open the details pane for one of the affected objects, and select
Conversion assistant>Help me fix object conversion issues.
Figure 1. Gemini conversion assistant prompts. (click to enlarge)
The Gemini pane opens.
In the Gemini pane, you click Insert suggestion
and then save SQL changes.
You repeat the steps for every faulty code object.
As you apply the code proposals, Gemini models learn the pattern
and offer to add the fix to all objects with the same issue.
The Review suggestions from Gemini dialog appears.
Figure 2. Gemini fix issues dialog.
(click to enlarge)
You click Review suggestions, and proceed to review suggested changes.
For each object, you click Accept code and exit the Gemini
suggestions view.
Now the conversion issue fix is applied to all faulty code objects in your
workspace.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-12 UTC."],[[["Database Migration Service offers a preview feature for heterogeneous SQL Server to AlloyDB for PostgreSQL migrations, subject to Pre-GA terms and limited support."],["Gemini in Database Migration Service is also a preview feature with limited support under Pre-GA terms, designed to assist in resolving SQL code conversion issues."],["Gemini helps identify how to change SQL Server code when the rule-based conversion engine cannot find a PostgreSQL equivalent."],["Gemini-powered code conversion workflow involves using the Conversion assistant, applying suggestions, and reviewing fixes, with the models learning and applying fixes across similar issues."],["Users must validate all output generated by the Gemini for Google Cloud products before use, due to the possibility of factually incorrect information."]]],[]]