How you can now create SQL with Natural Language

Google launches Duet AI in BigQuery

How Google uses AI to ease Data Analysis via SQL

Christianlauer
CodeX
Published in
2 min readSep 4, 2023

--

Photo by Leonardo Toshiro Okubo on Unsplash

Google has launched Duet AI for BigQuery, which is an AI-powered collaborator in Google Cloud. It should help Data Scientists, Analysts and especially business users to complete, generate, and explain SQL queries[1].

Similar to how Microsoft has already integrated AI such as ChatGPT for Azure Synapse & Co. and how you can use them to create source code, SQL queries and data pipelines by entering normal language, Google is now following suit and offering something similar for the BigQuery Data Warehouse.

Let’s take a look at this new feature and how it exactly works. In order to use it, you have to compose a new query in the query editor, enter one of the following natural language prompts and then press Enter. Here is a small example for that instance. Use the official documentation linked down below to dive deeper into this topic[2]:

# Using `bigquery-public-data.austin_bikeshare.bikeshare_trips`, calculate the
# average trip length by subscriber type.

BigQuery then will create a SQl-query, based on your natural language input via text:

SELECT
subscriber_type…

--

--

Christianlauer
CodeX
Editor for

Big Data Enthusiast based in Hamburg and Kiel. Thankful if you would support my writing via: https://christianlauer90.medium.com/membership