Skip to Content
ResourcesIntegrationsDatabasesClickhouse

Clickhouse

Clickhouse icon
Arcade Optimized

Tools to query and explore a ClickHouse database

Author:Arcade
Version:2.0.1
Auth:No authentication required
5tools
5require secrets

The Clickhouse toolkit connects Arcade to a ClickHouse database, enabling agents to explore database structure and execute read-only queries.

Capabilities

  • Schema discovery: List available databases, schemas (returns a default schema name since ClickHouse lacks PostgreSQL-style schemas), tables, and column-level structure for any table.
  • Read-only querying: Execute SELECT queries with structured clause inputs (select, from, join, where, having, order by, limit, offset); write operations (INSERT, UPDATE, DELETE) are not permitted.
  • Query safety guardrails: Built-in conventions enforced at the tool level — no SELECT *, always order results, case-insensitive string matching, trimmed strings, LIKE over regex, and joins only on indexed or primary-key columns.

Secrets

CLICKHOUSE_DATABASE_CONNECTION_STRING

A full ClickHouse connection string (DSN) that includes the host, port, user, password, and target database. This is a sensitive credential combining both connection details and authentication. Construct it in the format your ClickHouse driver expects (e.g., clickhouse://user:password@host:port/database). Retrieve the host and port from your ClickHouse deployment (self-hosted config or cloud provider dashboard such as ClickHouse Cloud), and use credentials created via your ClickHouse user management settings (CREATE USER / GRANT statements or the cloud console's Users section). Ensure the user has at minimum SELECT privileges on the target database.

Store this secret in Arcade at https://api.arcade.dev/dashboard/auth/secrets. For guidance on using secrets in Arcade tools, see the Arcade secrets documentation.

Available tools(5)

5 of 5 tools
Operations
Behavior
Tool nameDescriptionSecrets
Get the schema/structure of a ClickHouse table in the ClickHouse database when the schema is not known, and the name of the table is provided. This tool should ALWAYS be used before executing any query. All tables in the query must be discovered first, so that their exact names are known.
1
Discover all the databases in the ClickHouse database.
1
Discover all the schemas in the ClickHouse database. Note: ClickHouse doesn't have schemas like PostgreSQL, so this returns a default schema name.
1
Discover all the tables in the ClickHouse database when the list of tables is not known. ALWAYS use this tool before any other tool that requires a table name.
1
You have a connection to a ClickHouse database. Execute a SELECT query and return the results against the ClickHouse database. No other queries (INSERT, UPDATE, DELETE, etc.) are allowed. ONLY use this tool if you have already loaded the schema of the tables you need to query. The final query will be constructed as follows: SELECT {select_query_part} FROM {from_clause} JOIN {join_clause} WHERE {where_clause} HAVING {having_clause} ORDER BY {order_by_clause} LIMIT {limit} OFFSET {offset} When running queries, follow these rules which will help avoid errors: * Never "select *" from a table. Always select the columns you need. * Always order your results. Use the most important columns or the primary key if you're unsure. * Always use case-insensitive queries to match strings in the query. * Always trim strings in the query. * Prefer LIKE queries over direct string matches or regex queries. * Only join on columns that are indexed or the primary key. Do not join on arbitrary columns. * ClickHouse is case-sensitive, so be careful with table and column names.
1
Last updated on