AI query help: diff and fix
When a statement you run in a table popup fails, DataMind OS opens the Query Validation Error window and offers to repair it with AI. A repair arrives as a suggestion in the Query Difference Checker, where you compare it with the current query and apply it if it looks right. Nothing changes in the editor until you apply.
You meet both windows on the Queries step of a Dictionary and in the Import from SQL window of a Dimension or Fact table, where a failed Validate or Run Query starts the flow.
Fix a query that failed to validate
- Run the statement in the popup's editor: click Validate on a Dictionary's Queries step, or Run Query in the import window.
- When it fails, the Query Validation Error window opens. Its subtitle reads "Review the error details and optionally fix with AI.", and the message sits in the Error Details: block.
- Read the error. If it helps, describe what you were trying to do in Additional Context (optional); the box's placeholder reads "Add any additional context about what you were trying to do...".
- Click Fix with AI to send the failure for repair, or Close to fix the query yourself.
- While the repair runs, the button reads Fixing... and the window is locked: you cannot edit the box or close the window until it ends.
- When the repair succeeds, the window closes and the suggestion opens in the Query Difference Checker.
- The box is optional: the repair works from the failing query and its error, and it adds whatever you typed to that request.
- The box is cleared every time the window closes, so type your context again for a second attempt.
- The repair needs a saved object. If the table or the dictionary is not saved yet, the request is refused with a Cannot fix query message that says what to save first.
- If the repair itself fails, a Fix with AI failed message reports the reason. Try again, or fix the query by hand.
Review the suggestion and apply it
- Read the two sides of the diff: Current Query on the left is what the editor holds now, and AI Suggested Query on the right is the replacement the AI proposes.
- Press Enter or click Apply Changes to take the suggestion.
- Click Close to keep the current query instead; the suggestion is discarded and nothing in the editor changed.
- Each side of the diff carries a Copy control, so you can take either version out of the window.
- After you apply, the suggested query replaces the current one in the editor. Nothing is run or saved for you.
- On a Dictionary, applying clears the query's validation, so click Validate again.
- In the import window, you can run the statement with Run Query again to check the new result before you import.
Questions, answered
Which side of the diff is my query?
Current Query is on the left and is the SQL the editor holds right now. AI Suggested Query on the right is the AI's replacement. Read the two against each other before you decide.
What does Apply Changes do?
It puts the suggested query into the editor in place of the current one and closes the checker. It runs nothing and saves nothing by itself: validate the query again on a Dictionary, or run it again in the import window.
Can I press Enter to apply the suggestion?
Yes. Enter applies the suggestion; it does the same as Apply Changes.
Why can't I close the window while it is working?
While the repair runs, the Query Validation Error window locks its close controls and ignores the backdrop, so the repair cannot slip away half finished. Its context box is locked too. Wait for the repair to finish; applying a suggestion closes the checker in the same action.
Do I have to fill in Additional Context to fix a query?
No. The box is optional: the repair works from the failing query and its error, and it adds whatever you type. Leaving it empty still runs the repair.
Does my Additional Context carry over to the next attempt?
No. The box is cleared every time the window closes, so type the context again.
What if no suggestion appears after I click Fix with AI?
The repair did not finish. A Fix with AI failed message reports the reason; if the object is not saved yet, the message says what to save first. Read it, save if it asks you to, then try again. The window stays open for a retry. The full list is on Warehouse troubleshooting.
Which popups open these windows?
The Queries step of a Dictionary and the Import from SQL window of a Dimension or Fact table. A failed statement opens Query Validation Error; a finished repair opens Query Difference Checker. Windows with the same titles also appear on a View's and a transformation's query steps; for the transformation draft, see Build, test and finalize a transformation. Shared elements in table popups keeps a one-line summary of both windows.