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.
Creating an AI Chat Worksheet
Click the + button in the tab bar, enter a Worksheet name, select AI Chat, and click Create worksheet. The new worksheet opens with the AI badge in its tab.

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:
- Type your question in plain English
- AI analyzes your datasource schema
- Generates optimized SQL query
- 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
- In an AI worksheet, under References, a line such as Looked at 3 tables: ORDERS, CUSTOMERS, REGIONS — the tables given to the assistant as context for the answer. It is left out when the answer reports no tables.
Step 4: Results, or Execute Query
What happens next depends on what the SQL does:
| The reply | What you see |
|---|---|
Only reads data (SELECT) | It runs on its own and the output lands in the Result panel |
| Changes data or the schema | It does not run. The card says Writes data — not run yet. Click Execute Query, check the SQL in the Run this statement? dialog, then click Run |
| Cannot be run as it stands | Not run: and the reason — for example, it still contains placeholders. There is no Execute Query button |
Sometimes the assistant adds a caution under a query that can still run, such as a table missing from the source's table list. Read it before you rely on the output.
If DataDios cannot tell whether a reply reads or writes, it is treated as a write and asks first.
Snippets in a Chatbot answer are different: they keep their own Execute Query button, which runs the snippet as written, with no confirm dialog. Check them before you click.
Step 5: Modify and re-run
To change a query first, use the insert action to add the generated SQL to an open SQL worksheet tab, edit it, and click Run there.
Conversation View
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.
Ask AI from a SQL Worksheet
You don't have to open an AI Chat worksheet to use the assistant. Every SQL worksheet has an ASK AI box below the editor — type a question there ("give me invalid account numbers from accounts table") and the assistant answers against the source selected in the Catalog Rail.

The editor toolbar switches between three views of the same worksheet:
| View | Shows |
|---|---|
| Sql | The SQL you (or the AI) wrote — the editable query |
| Rendered | The query with its parameters and variables resolved |
| Conversation | Your questions and the AI's replies, each with its Generated query |
In the Conversation view, each generated query follows the same rule as in an AI worksheet:
| The reply | What you see |
|---|---|
Only reads data (SELECT) | Execute Query runs it and drops the output into the Result panel on the right |
| Changes data or the schema, or DataDios cannot tell | The card says Writes data — not run yet. Execute Query opens a Run this statement? dialog showing the SQL; click Run to go ahead |
| Cannot be run as it stands | Not run: and the reason, with no Execute Query button |
Only a read is added to the Sql tab. A write stays in the conversation until you confirm it. Re-running a write from History asks first too.
When the assistant can't resolve a column or schema from the selected source, it answers with a template instead — <account_number_column>, <schema> and similar placeholders, as in the capture below. Replace those (here, or in the Sql view) before clicking Execute Query; running the template as-is fails.

AI Chat vs SQL Worksheet
| Feature | AI Chat Worksheet | SQL Worksheet |
|---|---|---|
| Input method | Natural language | SQL code |
| Best for | Exploration, learning, quick answers | Precise queries, complex SQL |
| AI required | Yes | Optional (AI can assist via Conversation view) |
| Execute queries | A read runs by itself; a write waits for Execute Query and a confirm | Directly with Run button. A query from Ask AI follows the AI Chat rule: a write asks first |