Now Reading: Google tests BigQuery feature to generate SQL queries from English

Loading
svg

Google tests BigQuery feature to generate SQL queries from English

NewsJanuary 17, 2026Artifice Prime
svg11

Google is previewing a new AI-driven feature in its BigQuery data warehouse that generates parts of SQL queries from natural-language comments, something it claims will speed up data analysis and lower the barrier to working with complex queries as enterprises look to simplify data access in order to move their AI pilots into production.

The new feature, Comments to SQL, will enable developers and data analysts to write natural-language instructions in SQL comments and have them translated into executable queries inside BigQuery Studio.

To get started, users need to enable the SQL Generation widget inside the Studio and then write natural-language instructions directly inside SQL comments delineated by /* and */ — for example, describing the columns, dataset, and filters they want to apply, Gautam Gupta, machine learning engineering manager at Google, wrote in a blog post.

Those instructions can then be converted into SQL by clicking the Gemini gutter button and selecting the “Convert comments to SQL” option, which generates the corresponding query and displays a diff view showing how the comments were translated into executable SQL, he wrote, adding that developers can also refine instructions to get to the desired output, which shows up in the expanded view.

He provided several examples of the Comments to SQL converter at work, including this outline of a query in which the user calls for a window function and ranked data:

SELECT /* product name, monthly sales, and rank of products by sales within each category */
FROM /* sales_data */
WHERE /* year is 2023 */
WINDOW /* partition by category order by monthly sales descending */

That, he wrote, would generate the following SQL query:

SELECT
    product_name,
    SUM(monthly_sales) AS total_monthly_sales,
    RANK() OVER (PARTITION BY category ORDER BY SUM(monthly_sales) DESC) AS sales_rank
FROM
    `sales_data`
WHERE
    EXTRACT(YEAR FROM sale_date) = 2023
GROUP BY
    product_name, category, EXTRACT(MONTH FROM sale_date)

But it’s still a far cry from being able to turn something like “/* give me a list of products by category, ranked by monthly sales in 2023 */” into a working query that does what the user wants.

Minimizing friction in day to day tasks

Robert Kramer, principal analyst at Moor Insights and Strategy, said those working with data tend to think in terms of questions and outcomes, not syntax. “Translating intent into accurate and efficient SQL still takes time, especially with joins, time logic, and repetitive patterns. By allowing natural language expressions inside SQL comments, Google is trying to speed up that translation while keeping SQL as the execution layer,” he said.

With the new feature, teams could spend more time interpreting results and less time writing and rewriting queries, creating more automated analytics processes down the road while speeding up insights, minimizing team handoffs, and saving time on query setup, he added.

Google has continued to add AI-driven features to BigQuery to help developers and data analysts with SQL querying.

Last November, Google added three new managed AI-based SQL functions — AI.IF, AI.CLASSIFY, and AI.SCORE — to help enterprise users reduce the complexity of running large-scale analytics, especially on unstructured data.

These functions can be used to filter and join data based on semantic meaning using AI.IF in WHERE or ON clauses, categorize unstructured text or images with AI.CLASSIFY in GROUP BY clauses, and rank rows by natural language criteria through AI.SCORE in ORDER BY clauses.

Before that, in August, Google made incremental updates to the data engineering and data science agents in BigQuery that it had announced in April during its annual Google Cloud Next event to help automate data analytics tasks.

While the data engineering agent can help with pipeline building, data transformation and pipeline troubleshooting, the data science agent can automate end-to-end data science workflows, from creating multi-step plans through generating and executing code, reasoning about the results, and presenting findings.

Industry-wide shift

Google isn’t the only data warehouse and analytics service provider that is trying to integrate AI into SQL.

While Databricks already offers AI Functions that can be used to apply generative-AI or LLM inference directly from SQL or Python, Snowflake provides AI_PARSE_DOCUMENT, AISQL, and Cortex functions for document parsing, semantic search, and AI-driven analytics.

Other warehouses, such as Oracle’s Autonomous Data Warehouse, also support AI workflows alongside SQL.

Original Link:https://www.infoworld.com/article/4118161/google-tests-bigquery-feature-to-generate-sql-queries-from-english.html
Originally Posted: Fri, 16 Jan 2026 18:54:48 +0000

0 People voted this article. 0 Upvotes - 0 Downvotes.

Artifice Prime

Atifice Prime is an AI enthusiast with over 25 years of experience as a Linux Sys Admin. They have an interest in Artificial Intelligence, its use as a tool to further humankind, as well as its impact on society.

svg
svg

What do you think?

It is nice to know your opinion. Leave a comment.

Leave a reply

Loading
svg To Top
  • 1

    Google tests BigQuery feature to generate SQL queries from English

Quick Navigation