Vibe Querying Episode 13: Vibing with the OpenAI SDK

by Cameron Leblanc | January 26, 2026

Vibing with the OpenAI SDK

Build a Python chat application that combines OpenAI's ChatGPT models with CData Connect AI to create conversational interfaces for your enterprise data, enabling natural language queries across CRM, support tickets, and business metrics.

In Episode 13, "Vibing with the OpenAI SDK," hosts Stan and Cameron show developers how to build a Python application that integrates OpenAI’s GPT models with CData Connect AI, enabling natural language querying across enterprise systems—from CRM to support tickets and business metrics. The technical walkthrough covers the complete development workflow, including architecture setup and live demos.

Watch Now: Vibe Querying with MCP - Episode #13

Introducing MCP, CData Connect AI, and Vibe Querying

Model Context Protocol (MCP) is a standard protocol developed by Anthropic that allows LLMs and AI agents to connect with external data sources securely and efficiently. MCP enables AI to access real-time data, tools and workflows, allowing users to interact using natural language with the data, basically having conversations.

How we're using MCP today is with the CData Connect AI product and the remote MCP capability. Essentially, we're able to use CData Software's existing product, Connect AI, which lets you connect all your enterprise data sources to Connect AI. You have one remote MCP server URL to connect to your client of choice, which in our case today is OpenAI. (Sign up for a trial of our CData MCP Servers)

This brings us to the concept of "vibe querying" - much like vibe coding, it's a conversational approach to data exploration. You don't have to be a data expert. You don't have to build pipelines. You're not harassing your IT team to get your business data into the warehouse. You can simply connect your AI client, in this case, OpenAI, to your data and have conversations with it. So you get a conversational experience with your data.

Building conversational data apps: Goal of the episode

This episode demonstrates how to build Python chat applications that bring GPT-powered conversation directly to enterprise data. Stan and Cameron walk through architecture design, live coding, and querying CRM, support, and product usage data—all through natural dialogue.

The setup: Architecture and prerequisites

Before diving into code, Cameron explains the three-part architecture:

  • Python application – The user-facing chat interface

  • CData Connect AI MCP server – The semantic layer offering universal enterprise data access

  • OpenAI API – GPT-4 models for language understanding

Cameron notes, “Connect AI has a condensed toolset that normalizes every data source, so it can use the same tools to query anything—enabling seamless, multi-source reasoning.”

Prerequisites for development

This guide requires the following:

The demo dataset: Mini-CRM in action

We'll use a sample Google Sheet containing customer data to demonstrate the capabilities. This dataset includes accounts, sales opportunities, support tickets, and usage metrics.

  1. Navigate to the sample customer health spreadsheet

  2. Click File > Make a copy to save it to your Google Drive

  3. Give it a memorable name (e.g., "demo_organization") - you'll need this later

The spreadsheet contains four sheets:

  • account: Company information (name, industry, revenue, employees)

  • opportunity: Sales pipeline data (stage, amount, probability)

  • tickets: Support tickets (priority, status, description)

  • usage: Product usage metrics (job runs, records processed)

The code: Three Python classes powering conversational data

The project consists of three main components:

Config.py: Secure credential management

Handles all authentication and configuration through a Config class, managing OpenAI API keys, Connect AI credentials, and MCP server connections securely via environment variables.

Client.py: HTTP communication layer

The MCP Client class manages all communication with the CData Connect AI MCP server, handling tool calls and data retrieval across connected sources through standardized HTTP protocols.

Agent.py: AI intelligence orchestration

The MCP Agent class combines OpenAI's language understanding with Connect AI's data tools, enabling natural language queries against live business data by intelligently routing user prompts to appropriate data operations.

Live demonstration: From simple queries to advanced analytics

Query 1: Basic revenue analysis

User prompt: "Based on this Google Sheets connection, show me our top five customers based on annual revenue."

The application immediately connects to the configured data source, executes the appropriate query, and returns formatted results. No SQL knowledge required, just natural conversation with business data.

Query 2: Multi-source support intelligence

User prompt: "Which customers have the highest support ticket volumes?"

This demonstrates Connect AI's semantic layer in action. The system seamlessly queries across multiple data tables (customer records and support tickets) to provide comprehensive insights that would traditionally require complex joins and manual analysis.

Stan highlights the multi-source capability: "This really highlights one of the huge value adds of using a platform like CData Connect AI where you're able to connect to multiple data sources... you would be able to connect to Jira, Salesforce, anywhere your support ticket data might lie and query that in conjunction with your CRM data."

Query 3: Conversational troubleshooting

User prompt: "What are the account names for these accounts?"

When the initial query returned customer IDs instead of readable names, a simple follow-up question resolved the issue instantly. This demonstrates the flexibility of conversational interfaces—no need to rebuild queries or navigate complex dashboards.

Cameron captures the value: "This is where just being able to talk to your data is a big deal. Because if you were just working in a dashboard, you would get this customer ID, and you would have to manually run a query to find the account name for this customer. Now you can just ask it like you would, conversationally."

Query 4: Advanced derived view analysis

User prompt: "Based on the demo customer health score derived view in the CData connection, show me a picture of health for Premium Auto Group Europe."

This query showcases Connect AI's derived views, pre-configured SQL queries that create deterministic business metrics across teams. The system retrieved:

  • Usage patterns and last activity dates

  • Account type and revenue information

  • Open opportunities and support ticket status

  • Calculated health scores with risk indicators

Stan emphasizes the collaborative benefit: "By preconfiguring the definitions for these custom objects, these derived views, you are able to ensure common language across anyone who might be using the connection and the data that you connected to via CData Connect AI."

Technical excellence: Universal database approach

What sets Connect AI apart is its SQL-based interface for AI data access. Instead of custom integrations for every source and model, Connect AI provides a unified SQL layer that GPT models can use directly.

This solves the "N×M integration problem" that typically plagues enterprise AI implementations:

  • Universal Compatibility: Same tools work across 350+ data sources

  • Native AI Understanding: LLMs are trained extensively on SQL

  • Enterprise Performance: Query optimization, source-specific intelligence, and parallel execution

  • Comprehensive Access: Every field, endpoint, and custom object available

The session showcases smart query generation, multi-source joins, and contextual understanding of enterprise relationships, all powered by CData Connect AI.

From analysis to action: The future of business intelligence

Episode 13 showcases a fundamental shift in enterprise data interaction. Instead of navigating complex interfaces and waiting for IT support, business users can now have natural conversations with their data, getting instant answers to strategic questions.

The combination of OpenAI's language understanding with Connect AI's semantic intelligence creates a new category of business application—one where the barrier between human insight and data access disappears entirely.

As Stan reflected: "We built a real Python chat app that connects to OpenAI, uses OpenAI's models to actually query your live data all through the CData Connect AI connectivity layer."

Ready to start vibing with your enterprise data?

The age of conversational business intelligence has arrived. When AI can access, analyze, and discuss your enterprise data through natural language, the only limit is your curiosity.

Sign up for a free trial, explore the complete source code, and start building conversational data experiences today. For inspiration and proven query examples, check out the full walkthrough, our comprehensive prompt library, and join the growing CData Community of developers building the future of business intelligence.

Check out the OpenAI integration documentation and CData Connect AI to get started with your own conversational data applications.

Join us for future episodes of Vibe Querying, where we continue exploring how natural language AI transforms business intelligence. Until next time, stay curious and keep vibing with your data!

Explore CData Connect AI today

See how Connect AI excels at streamlining business processes for real-time insights.

Get the trial