In December we announced big updates to the SQL node in Observable Canvases — our new collaborative whiteboard for flexible data exploration and visualization on an infinite canvas — that improve the SQL writing, editing, and troubleshooting experience.
Now, we’re excited to share how we’ve streamlined AI in the SQL node, making it even faster to draft and customize queries with text-to-SQL prompts. Read on to learn about our new AI integration within SQL nodes, directly editable SQL queries, and visual diffs that leave no doubt about what’s changing as you iterate.
A new AI toolbar right in the SQL node
Previously, users could write prompts in the AI toolbar at the bottom edge of their browser window to generate a new SQL query. This wasn’t ideal: writing AI prompts outside of the SQL node created too much distance between the query and AI, leading to a fragmented experience spread across different places on the canvas.
Now, we’ve added an AI toolbar directly into the SQL node, which lives immediately below the query. This eliminates the physical and mental gap between your AI requests and what’s generated by it, so you can more easily evaluate and update the output.
Open the AI toolbar in a SQL node by clicking the icon in the top left of the side panel, or using the Cmd-k shortcut (Ctrl-k for Windows). Write and send your request, inspect the code, then run the query and see the resulting data — all in one place on the canvas, as shown below.
Use AI to update existing SQL queries
Another limitation of our earlier AI for SQL experience in canvases was that AI could only create new queries in new SQL nodes — it could not edit existing queries. This resulted in unused and redundant SQL nodes cluttering the canvas. Plus, it hindered AI-assisted iteration because prompts always created a brand new query instead of making tweaks to an existing one.
With our recent updates, you can now use AI to edit existing SQL queries. Below, a user makes two updates to an existing query, first changing to revenue aggregation from monthly to yearly totals, then excluding the Electronics & Media category:
As you edit, you might also want to take a look back at previous requests. Hover over the truncated prompt text in the AI toolbar to explore your prompt history:
AI suggestions highlighted by visual diffs
AI can be a powerful tool to accelerate data wrangling and analysis, but only if users have full confidence in the results. In canvases, we’re taking a human-centric approach to AI that produces verifiable, interpretable outputs allowing for scrutiny and correction.
In line with that philosophy, we want to ensure that when AI makes changes to existing SQL code, the changes are easy to find, inspect, and update.
With our new visual diffs, there’s never a question about what will be added to, or removed from, your SQL query. AI-suggested SQL updates are shown in green (for added code) or red (removed code), as shown below. A user can choose to accept or reject the AI suggestions before re-running the query.
Advancing AI-powered data analysis in Observable Canvases
Here, we’ve highlighted several recent updates that improve how analysts can use AI to supercharge their data wrangling and analysis in SQL nodes in Observable Canvases. With a new AI toolbar that operates directly in the SQL node, the ability to edit existing queries, and visual diffs that leave no doubt about how AI suggestions will change your code, we now offer an even more streamlined and trustworthy text-to-SQL experience.
Want to follow along as we built out the premiere platform for AI-powered data exploration, visualization, and analysis? Bookmark or subscribe to our release notes, and sign up for our monthly newsletter to stay up to date with what’s new in canvases.

