Skip to main content

AI Chat

Overview

AI Chat is a dedicated worksheet mode for natural language interaction with your data. Ask questions in plain English, get SQL query suggestions, explore database schemas, and troubleshoot issues — all within its own worksheet tab.


Accessing AI Chat

Click the + button in the tab bar and select AI Chat from the New Worksheet picker. A new worksheet opens with the AI badge in its tab.

AI Chat worksheet

Note: The AI Status Pill in the top-right corner must show as configured (green) for AI Chat to function. If it shows "Not Configured" (orange), contact your DataDios administrator to set up an AI provider.


What You Can Ask

1. Natural Language to SQL

Transform business questions into executable SQL queries.

Examples:

  • "Show me the top 10 customers by revenue"
  • "Find all orders from last month"
  • "What are the average sales by region?"
  • "List products that haven't been ordered in 90 days"

How it works:

  1. Type your question in plain English
  2. AI analyzes your datasource schema
  3. Generates optimized SQL query
  4. Provides explanation of the logic

2. Schema Exploration

Understand your database structure without writing queries.

Examples:

  • "What columns are in the orders table?"
  • "How are customers and orders tables related?"
  • "What's the structure of the products table?"
  • "Show me all tables in this database"
  • "What are the primary and foreign keys in the sales table?"

Benefits:

  • Discover available data without manual documentation lookup
  • Understand table relationships and dependencies
  • Learn data types and constraints
  • Identify join opportunities

3. Query Optimization & Debugging

Get help improving performance and fixing errors.

Examples:

  • "Help me optimize this slow query"
  • "Why am I getting a syntax error?"
  • "How can I join these three tables?"
  • "This query is taking too long, what's wrong?"
  • "How do I add an index to improve performance?"

AI Capabilities:

  • Identifies missing indexes
  • Suggests query restructuring
  • Explains error messages in plain language
  • Recommends best practices for your datasource type

Using AI-Generated SQL

Step 1: Select a Datasource

In the Catalog Rail (left sidebar), select the datasource you want to query. This gives the AI context about your schema.

Step 2: Ask Your Question

Type your question in the AI Chat worksheet and press Enter.

Step 3: Review AI Response

The AI will provide:

  • Generated SQL code in a formatted code block
  • Explanation of the query logic
  • Any relevant notes or recommendations

Step 4: Insert into SQL Worksheet

Use the insert action on the generated SQL to add it to an open SQL worksheet tab, where you can review and modify it.

Step 5: Execute

Switch to the SQL worksheet tab, verify the query, and click Run to execute and view results.


Conversation History

The AI Chat worksheet maintains context throughout your session, allowing for follow-up questions. You can also access the conversation history from any SQL worksheet by switching to the Conversation view mode in the editor toolbar.


AI Chat vs SQL Worksheet

FeatureAI Chat WorksheetSQL Worksheet
Input methodNatural languageSQL code
Best forExploration, learning, quick answersPrecise queries, complex SQL
AI requiredYesOptional (AI can assist via Conversation view)
Execute queriesVia insert into SQL worksheetDirectly with Run button