Skip to Content
ResourcesIntegrationsDatabasesClickhouse

Clickhouse

Clickhouse icon
Community

Tools to query and explore a ClickHouse database

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

ClickHouse Toolkit

Arcade's ClickHouse toolkit connects agents to a ClickHouse database, enabling schema discovery and read-only SQL querying.

Capabilities

  • Database & table discovery — list all databases, enumerate tables, and retrieve table schemas before constructing queries.
  • Schema introspection — inspect column names, types, and structure for any known table; ClickHouse-style (no PostgreSQL schemas; a default schema name is returned).
  • Read-only querying — execute SELECT statements with full support for joins, filters, aggregations, ordering, and pagination; INSERT, UPDATE, DELETE, and DDL are blocked.
  • Query safety guardrails — built-in rules enforce explicit column selection, case-insensitive string matching, string trimming, LIKE over regex, and index-only joins to reduce runtime errors.

Secrets

CLICKHOUSE_DATABASE_CONNECTION_STRING — A connection string (DSN) that encodes all credentials needed to reach your ClickHouse instance: host, port, username, password, and target database. The typical format used by the clickhouse-driver or the ClickHouse HTTP interface is clickhouse+native://user:password@host:port/database (native TCP) or clickhouse+http://user:password@host:port/database (HTTP). Obtain the individual components from your ClickHouse deployment: for ClickHouse Cloud, find the host and port under Connect → Connection details in the ClickHouse Cloud console, then use the credentials of a database user that has at minimum SELECT and SHOW privileges on the target database. For self-hosted instances, consult your cluster configuration. Store the assembled string as an Arcade secret rather than embedding it in code.

See the Arcade secrets documentation for how to register secrets, or manage them directly at https://api.arcade.dev/dashboard/auth/secrets.

Available tools(5)

5 of 5 tools
Operations
Behavior
Tool nameDescriptionSecrets
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
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
Last updated on