Attach the error a query actually threw and ask for a fix. The correction is grounded in your real schema, not a generic guess at what the error usually means.
No credit card. 14 days. Cancel in one click.
Quick answer: Run the failing query, open Ask (⌘L), attach Last error, and ask why it failed or ask for a fix. Claude reads the real error text and your actual schema, not a paraphrase, and returns corrected SQL you can insert or run directly.
You need a query that's actually failed, an Anthropic (or other provider) API key added in Settings, and the connection that produced the error still selected. This works on any of the nine connectors.
Say a query against a Databricks warehouse fails with [TABLE_OR_VIEW_NOT_FOUND] Table or view 'orders' cannot be found, because the query used a bare table name instead of the full catalog.schema.table path. Attach Last error and ask for a fix. A reasonable response points out the missing qualifiers and corrects it to:
SELECT * FROM main.sales.orders LIMIT 100;
along with a short explanation that Databricks needs the catalog and schema unless a default is set on the connection.
Run the corrected query. If it returns rows without an error, you're done. If it fails again with a different error, attach that new error and ask again, most fixes need one round, some need two if the first error was masking a second problem underneath.
| If you see | Fix |
|---|---|
| The fix references a column that also doesn't exist | Ask the panel to check the table's actual columns first, or open the explorer and look yourself before asking again. |
| "Add an Anthropic API key in Settings" | Debugging needs the same key as any other Ask question. Add one in Settings → AI Assistant. |
| The suggested fix changes the query's meaning, not just its syntax | Say so directly, ask for a fix that keeps the original filters, and it'll adjust rather than starting over. |
| Same error after the suggested fix | The real issue might be a permissions or connection problem rather than the query itself. Check connection diagnostics if it looks unrelated to syntax. |
It's not a substitute for connection-level troubleshooting. If nothing you write succeeds, the problem is more likely the connection than any individual query, see database connection failed, how to actually fix it instead.
A query fails with permission denied for table customers. Attach Last error and ask what happened. The panel explains that this is a grants issue, not a syntax problem, and that the role running the query needs SELECT on that table, it can't grant the permission itself, but it saves you from assuming the query is wrong when the connection's role is what actually needs fixing.
Attach a query's result set instead of an error and ask "does anything here look wrong" after a query that ran successfully but returned numbers that seem off. This catches logic errors, a JOIN that's silently duplicating rows, a date filter off by a day, that don't throw an error at all but still produce a wrong answer.
A query joining orders to order_items without aggregating first returns a revenue total that's obviously too high. Attach the result and ask what looks wrong; the panel notices the row count is larger than the order count and flags the missing GROUP BY or the need to aggregate items before joining, a bug that would never throw an error on its own.
The same workflow applies whether the failure came from Postgres, Snowflake, BigQuery, or Databricks. A BigQuery job failing on a result over 25 MB with no LIMIT gets a fix that adds one; a Databricks Unity Catalog permissions error gets pointed at the missing grant rather than treated as a syntax problem.
No. It proposes a fix and shows the corrected SQL; you choose to run it or insert it into the editor. Nothing changes without you clicking something.
Claude reads the error text and explains what it means, including permissions errors, but it can't grant you access. It'll point at what role or grant is likely missing so you know who to ask.
The error format differs by database, Postgres, Snowflake, BigQuery, and Databricks each phrase errors differently, but the panel reads the type of connection and interprets accordingly.
Yes, paste it into the editor, run it, and attach the resulting error the same way. It doesn't need to be a query the panel wrote originally.
No, it's the same feature, this page is specifically about the debugging workflow: attaching an error and asking for a fix, rather than asking a new question from scratch.
14-day free trial, no card. Attach your next failed query and see the fix.
No credit card. 14 days. Cancel in one click.