Building data models used to mean long hours of manual coding—carefully crafting pipelines, deciphering data intricacies, and fine-tuning logic to meet every client’s demands.
In this post, we’ll first revisit the traditional approach using Google Cloud Platform (GCP), Dataform for pipeline creation, and GitHub for version control. Then, we’ll introduce a more modern AI-driven method—leveraging Aider and Claude 3.7 Sonnet to automate these tasks.
Imagine setting up your GCP project, configuring data pipelines, and maintaining your codebase—without the usual manual overhead. Instead of getting stuck in repetitive debugging cycles, you’ll shift to an efficient, AI-powered workflow that streamlines SQL development and troubleshooting.
By the end of this guide, you’ll have:
✅ A solid foundation in traditional SQL workflows
✅ A clear understanding of AI-driven automation in data modeling
✅ Step-by-step insights into integrating Aider and Claude 3.7 Sonnet into your workflow
Let’s dive in. 🚀
This process sounds simple—but in reality, it can take hours or even days, especially when dealing with:
Good news: That’s exactly what Aider + Claude 3.7 Sonnet can do. Let’s explore how they transform SQL automation.
Aider is an AI-powered command-line assistant that seamlessly integrates into your coding workflow. It helps you write, modify, and debug code directly from your terminal.
By eliminating manual coding bottlenecks, Aider frees up your time so you can focus on high-level problem-solving instead of getting stuck in syntax and debugging.
Claude 3.7 Sonnet is an advanced AI assistant designed to understand complex logic, optimize queries, and enhance SQL workflows.
Most AI tools can generate SQL queries, but few truly understand the complex logic of data modeling.
Claude doesn’t just write code—it validates, optimizes, and explains it, ensuring your workflows are scalable and efficient.
Claude 3.7 Sonnet isn’t just another AI tool—it has been benchmarked against top AI models and has shown exceptional performance, especially in coding-related tasks.
📈 Performance Benchmark:
This high-level reasoning capability is what makes Claude so effective in assisting with complex SQL queries and debugging workflows.
Note: By the time we were writing our blog post on Claude 3.7 Sonnet, Gemini 2.5 Pro had already outperformed Claude 3.7 Sonnet in benchmark tests.
AI advancements are moving fast, and keeping up with the latest model updates can be challenging. If you're interested in comparing their performance across different tasks, you can check out the latest benchmark results here.
To install Aider and set up Claude for use on your local system, follow these steps. These instructions are specifically for macOS, but the process may be similar for other operating systems with slight modifications.
Homebrew is a package manager for macOS that simplifies software installation. Run the following command to install Homebrew:
2. Visual Studio Code installation
VS Code is a lightweight yet powerful code editor that supports various extensions. Install it using Homebrew:
Pipx is a handy tool for installing and running Python command-line applications in isolated environments. It helps keep your global Python environment clean and makes managing CLI tools much easier.
Restart your terminal after installing pipx
Aider is an AI-assisted coding tool that integrates with large language models like Claude 3.7 Sonnet and GPT-4o to help with development tasks. Install it using pip:
Then execute the following:
Use one of the following commands to start Aider, replacing your-key-goes-here with your actual API key:
Claude-3-7-sonnet-20250219 (32k thinking tokens):
For Claude 3.7 Sonnet a yaml configuration file is required, in which you can specify the number of thinking tokens, this is an example for 32k thinking tokens:
Create this file in the root folder (remember to include the dot (.) at the beginning) with the exact name and content provided below.
Filename:
.aider.model.settings.yml:
You've successfully set up Aider and configured Claude on your local system. Now, you're ready to explore its capabilities and streamline your workflow.
To demonstrate the implementation we are using a dummy table - employee_sale. You can experiment with your own data, and if you're new to the whole process, you can download any public dataset available. Here is a useful resource you can use to access public data online.
Once the installation is complete, few things to check before you start your implementation:
Open your terminal in the VS Code, and run this command
Note: Every time you open a new terminal, make sure to run this command.
Once you’re inside the aider environment, you will have several options: /add, /ask, /undo, /chat-mode etc. If you want to learn more about specific commands, use this Tips from Aider.
So, let’s begin by adding a file to the knowledge base,
/add - Lets you add the file to its knowledge base
For example /add *, will add all your files and schema into its knowledge base, and become ‘context-aware’
You can also opt to add just the specific file for example
/add definitions/01_raw/employee_sales.sqlx
Once your files are added to the knowledge base, you can start asking questions by using /ask
With just a few simple steps, you've successfully set up Aider and integrated it with Claude 3.7 Sonnet. Now, you can effortlessly interact with your data, ask insightful queries, and streamline your workflow with AI-powered assistance. Imagine how much time you'll save and how efficient your processes will become! Pretty amazing, right?
You’ve now seen what’s possible when you combine traditional data modeling workflows with cutting-edge AI assistants like Claude 3.7 Sonnet and Aider. What once took hours—or even days—can now be handled in minutes, with fewer errors and greater clarity.
Deploying these tools locally gives you complete control, privacy, and flexibility—whether you're building pipelines, debugging complex SQL logic, or generating clean documentation.
If you enjoyed this blog, you'll love these too! Dive into more captivating content:
Upgrade Your ls Command to eza
Latest Updates on Google Data Analytics
Your AI Companion in the Google Cloud
Awakening the Data Messenger by Integrating BigQuery with Slack
Check out our LinkedIn account, to get insights into our daily working life and get important updates about BigQuery, Data Studio, and marketing analytics.
We also started with our own YouTube channel. We talk about important DWH, BigQuery, Data Studio, and many more topics. Check out the channel here.
If you want to learn more about using Google Data Studio and taking it to the next level in combination with BigQuery, check out our Udemy course here.
If you are looking for help setting up a modern and cost-efficient data warehouse or analytical dashboard, email us at hello@datadice.io and we will schedule a call.