Skip to Content

AI Assistant in the SQL Console

CloudQuery Platform SQL Console with the AI Assistant panel showing a plain-language question, the SQL it generated, and the query results

The SQL Console includes a built-in AI Assistant panel that writes ClickHouse SQL from plain-language descriptions. Describe what you want to find, and the assistant figures out which tables are relevant, inspects their schemas, and generates a query you can run or refine.

CloudQuery Platform also includes the AI Assistant under Ask AI in the sidebar, a full conversational agent that can answer questions directly and supports both schema-only and full data access modes.

How to use it

Click AI Assistant at the top of the SQL Console, describe what you’re looking for, and submit. The assistant typically responds in a few seconds, with the generated SQL in the panel.

The query is not written into the editor until you ask for it. Click Apply to editor. If the editor is empty, the query goes straight in and you run it with Run Query. If the editor already holds a query, the new one is staged as a pending change: Accept & Run runs it immediately, Accept keeps it in the editor without running, and Reject discards it and leaves the editor as it was.

How it works

The assistant is powered by Claude (Anthropic) running on AWS Bedrock. Each request follows this sequence automatically:

  1. Table discovery: searches the CloudQuery catalog for tables relevant to your question
  2. Schema inspection: reads the column names and types for those tables
  3. Syntax validation: checks the generated SQL against the CloudQuery database before returning it

Data privacy

The SQL Console AI Assistant can only see the structure of your data: table names and column definitions. It never reads, queries, or transmits the actual contents of your CloudQuery database.

Here is exactly what the model can and cannot access:

The model can seeThe model cannot see
Table names in your CloudQuery databaseRow data of any kind
Column names and their data typesValues stored in any column or field
SQL syntax validation resultsCredentials, connection strings, or API keys

This is not configurable. The SQL Console AI Assistant always operates in schema-only mode. There is no setting that would allow it to read your data.

AWS Bedrock does not use customer data to train or improve foundation models. Your queries and schema information are not retained for model training purposes.

Conversation context

The assistant remembers the last 20 messages within a session. This means you can iterate (ask a follow-up question to refine a query, correct a mistake, or narrow the scope) without starting over each time.

Limitations

  • The model occasionally generates SQL referencing a table or column that doesn’t exist. When this happens it usually self-corrects within the same request after observing the error.
  • Tables with many hundreds of columns may require the model to paginate through the schema, which can add a few seconds.
  • The assistant is scoped to SQL generation tasks. Off-topic requests are declined.
  • Queries involving deeply nested structures (such as AWS resource tags stored as JSON, or arrays of security group rules) may need manual adjustment after generation.

FAQ

How do I access this feature?

This feature is available to all CloudQuery Platform users. Click AI Assistant at the top of the SQL Console.

Which AI model does this use?

Claude Sonnet 4.5 and Haiku 4.5 (Anthropic), running on AWS Bedrock. The models only receive the information described in the Data privacy section above.

Does the AI have access to my data?

No. The SQL Console AI Assistant only sees table names and column definitions; it cannot query or read any row data from your CloudQuery database. See Data privacy for the full breakdown.

Is there an AI feature that can also reason about my actual data?

Yes. The AI Assistant under Ask AI in the sidebar supports a Full Access mode where it executes queries and returns results directly in the chat. This mode is enabled by organization administrators in Platform Settings.

The CloudQuery MCP Server is another option: it lets you connect Claude Desktop, Cursor, or other MCP-compatible tools to your CloudQuery database directly and requires a separately issued API key.

Next Steps

  • AI Assistant - The conversational AI under Ask AI in the sidebar with full data access support
  • SQL Console - Save and manage your AI-generated queries
  • Query Examples - Browse curated security, compliance, and cost queries
  • CloudQuery MCP Server - Use the CloudQuery MCP server with AI assistants that can also read your data
Was this page helpful?

Last updated on