Sending an error to the AI
- Run a query that produces an error.
- In the error message, click Send to chat (or the equivalent action).
- The chat panel opens with the error pre-filled as a message.
- The AI analyzes the error in context — it knows your query, datasource type, and schema.
- It proposes a fix, typically as a suggested query diff.
What the AI considers
When debugging an error, the AI:- Reads the full error message from your database.
- Examines your current SQL.
- Checks the database dialect (Postgres, Snowflake, etc.) to ensure the fix uses valid syntax.
- May search the catalog to verify table and column names.
- May run a corrected query to confirm it works before suggesting it.
Common fixes
| Error type | AI approach |
|---|---|
| Syntax errors | Fix typos, missing commas, incorrect keywords. |
| Unknown column/table | Search the catalog and correct the name. |
| Type mismatches | Add casts or adjust the query logic. |
| Ambiguous column | Add table aliases to disambiguate. |
Related
- Accepting suggestions — reviewing the AI’s proposed fix.
- SQL editor
- AI overview