Back to Blog
How To
AirOps Team
July 15, 2024

How to automatically write dbt SQL queries using AI

Table of Contents

Section Name

Get the best and latest in growth and AI workflows delivered to your inbox each week.

Thank you for subscribing!
Oops! Something went wrong while submitting the form.

SHARE

Analytics engineers spend the majority of their days working with SQL inside of dbt. Repetitive tasks, like writing queries, add up over time. 

That’s why AirOps created an AI-assisted tool that takes the manual labor out of writing SQL in dbt Cloud.

Automatically write SQL in dbt Cloud using AI

Data Sidekick combines the power of AI with context from your data warehouse to take the grunt work out of common data tasks, including writing SQL. 

You can ask a question using natural language and immediately get a properly formatted SQL query to input into dbt Cloud.

In addition to drafting dbt SQL queries, you can also use Sidekick’s collection of AI-powered data apps to:

  • Auto document table schemas ✍️
  • Generate a full Python script from a dbt model 🐍
  • Optimize queries to improve speed and trim your warehouse bill 💸
  • Suggest questions a specific database table can answer 🧐

… and more. We’re always developing new AI data apps, too. 

The best part? Sidekick is completely free for individual users. 

See Data Sidekick in action

Curious about how Sidekick performs in the wild? See what Kyle Dempsey, Head of CX and Solutions Architecture at AirOps, has to say about using it to automatically write SQL queries in dbt.

How does Sidekick help analysts improve their dbt workflows?
Many data analysts spend the majority of their day working in a tool like dbt.

While dbt users tend to know SQL well, the time it takes to finish repetitive tasks like listing field names, writing standard joins, and performing simple data manipulation tasks (like truncating a date) adds up. Then there’s analysts who are less familiar with dbt. For them, the combination of SQL and Jinja can be a bit confusing.

Sidekick makes things infinitely easier. It understands the structure of your data and uses those tables to generate a SQL query based on a natural language prompt. The dbt SQL recipe will even format the query correctly using dbt syntax, so you can use it directly inside of dbt Cloud.
How much time does Sidekick save you?
I’d estimate that using Sidekick to write my dbt SQL queries saves me anywhere from 30 seconds to 30 minutes per query.

Scale your most ambitious SEO strategies

Use AI-powered workflows to turn your boldest content strategies into remarkable growth

Book a CallStart Building

More from AirOps

Building with AI
AirOps Team

How Retail Teams Are Getting 100X More Done with AI (No ML Engineers Required)

Read More
Best Practices
AirOps Team

How Long Should a Product Description Be?

Read More
Best Practices
AirOps Team

What Is Alt Text on an Image?

Read More
Start Building