Fixing translation errors

In most cases, SQL Tran automatically translates database objects with a high degree of accuracy. However, certain objects may contain SQL features that are not supported in the target environment. This is the case in our example project, where one object contains a construct that Fabric Warehouse does not support.

When this occurs, SQL Tran does not attempt to remove or rewrite the unsupported constructs. Instead, it inserts diagnostic comments into the target SQL to clearly flag the problematic areas for manual inspection.

This page guides you through identifying and resolving such a translation error by updating the source SQL and recreating the corrected object in the target staging database, ensuring the environment is clean and ready for testing.


Finding erroneous database objects

Previously in this training, we learned that problematic database objects can be identified using several built-in reports available from the Reports screen:

  • Objects with errors – Lists all database objects that contain translation errors.

  • Grouped errors – Organizes all detected translation errors by error type.

  • Objects could not be created – Shows all objects that failed during the creation step in the target staging database.

In addition to these reports, one of the easiest ways to locate such objects is by using the Errors tab. This tab displays a structured tree of issues grouped by type and allows quick navigation to the associated database objects.

SQL Tran provides multiple ways to approach the same task, ensuring flexibility across projects of different sizes and complexities.

For this walkthrough, we’ll use the Objects tree in the Workspace screen to locate the object with a translation error, as our demo project contains only a small number of objects.


1. Go to the Workspace screen

Click the Workspace button in the left sidebar to open the screen.

Navigating to the "Workspace" screen

2. Select the Objects tab

Click the Objects tab to display the categorized tree view of all project objects.

Selecting the "Objects" tab (with "Errors" tab visible alongside)

Note that the Errors tab is also visible, indicating that translation errors are present. This tab provides a convenient overview of translation issues, making it easy to navigate to the affected objects.


3. Expand an object category

Each object type group displays a count (e.g., Procedures (8 of 9)) indicating how many objects were processed successfully. This makes it easy to identify categories that contain errors.

Expand a group where an error is suspected.

Identifying and expanding a category with translation errors

4. Select an erroneous database object

Each object in the Objects tree has four small circular indicators that represent its progress through the object lifecycle stages. The second indicator corresponds to the Translation stage. A red icon in this position indicates that a translation error has occurred during processing.

Click a database object with a red Translation indicator to view its details.

This opens the object’s source and translated SQL code in the editors and displays related metadata in the header pane. The lifecycle status in the header will also confirm that translation has failed.

Selecting object with translation error

In this case, SQL Tran has inserted a diagnostic comment at the top of the translated SQL, highlighting the unsupported feature that triggered the error. These comments make it easy to identify and address issues manually.


5. Unlock source SQL for editing

Open the Actions dropdown and choose Override source to make the source SQL editable.

Unlocking source SQL for editing

You can also access the same option by right-clicking the object in the Objects tree and selecting it from the context menu.


6. Comment out the unsupported source SQL line

Once editing is enabled, locate and comment out the SQL line containing the unsupported construct.

Commenting out unsupported Fabric feature

Alternatively, you could exclude the object from processing altogether by using the Ignore this object option from either the Actions dropdown or the context menu accessed by right-clicking the object in the Objects tree.


7. Observe translation status update

After editing the source, SQL Tran automatically reprocesses the object. The red Translation indicator will be removed in both the header pane and the Objects tree.

"Translation" indicator showing no errors

Since this was the only error in the project, the Errors tab is also removed automatically, indicating that the project is now error-free.


8. Recreate the target object

With the translation error resolved and the updated SQL applied, the object must now be recreated in the target staging database to reflect these changes.

Open the Actions dropdown and select Create object in target staging.

Initiating object recreation in target staging

An Initializing dialog will briefly appear while the operation begins.

After the process completes, SQL Tran displays a result dialog titled Everything was created successfully. This dialog summarizes the steps performed and confirms that the operation completed successfully.

Click the OK button to close the dialog and return to the Workspace screen.

Confirming successful object creation

9. Ready for testing

With the translation issue resolved and the object successfully recreated in the target staging database, we are ready to move forward. Since representative data is essential for meaningful testing, the next section will explain its importance and describe how to prepare the staging environment for effective test execution.

Last updated