ClickHouse

Connect to a ClickHouse database

ClickHouse is an open-source, column-oriented database management system for online analytical processing (OLAP). It is built for speed at scale — running aggregations and analytical queries over billions of rows in real time.

The ClickHouse block connects to any ClickHouse deployment (ClickHouse Cloud or self-hosted) over the HTTP interface. Use it to run analytical queries, stream rows into tables, manage schemas, inspect system state, and execute arbitrary SQL — all from within a workflow.

Connection details

  • Host — your ClickHouse hostname (e.g. your-instance.clickhouse.cloud or your server address).
  • Port — the HTTP interface port. Use 8443 for HTTPS (ClickHouse Cloud) or 8123 for plain HTTP (self-hosted).
  • Database / Username — default to default if not specified.
  • Password — optional for unauthenticated local instances.
  • Use HTTPS — keep enabled for any remote or Cloud instance.

Things to know

  • UPDATE and DELETE are implemented as ClickHouse mutations (ALTER TABLE ... UPDATE/DELETE). Mutations run asynchronously in the background, so the affected row count is not returned immediately.
  • ClickHouse is optimized for bulk inserts. Prefer batching many rows per insert over many single-row inserts.
  • The connection host is validated to block private/internal addresses, so the block cannot reach localhost or internal-only hosts.

Usage Instructions

Integrate ClickHouse into the workflow. Query and insert data, manage databases and tables, inspect schemas, monitor mutations and running queries, manage partitions, and execute raw SQL over the ClickHouse HTTP interface.

Tools

clickhouse_query

Execute a SELECT query on a ClickHouse database

Input

ParameterTypeRequiredDescription
hoststringYesClickHouse server hostname (e.g., your-instance.clickhouse.cloud)
portnumberYesClickHouse HTTP interface port (8443 for HTTPS, 8123 for HTTP)
databasestringYesDatabase name to connect to
usernamestringYesClickHouse username
passwordstringNoClickHouse password
securebooleanNoUse a secure HTTPS connection (default: true)
querystringYesSQL SELECT query to execute

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayArray of rows returned from the query
rowCountnumberNumber of rows returned

clickhouse_execute

Execute raw SQL (DDL, mutations, or queries) on a ClickHouse database

Input

ParameterTypeRequiredDescription
hoststringYesClickHouse server hostname (e.g., your-instance.clickhouse.cloud)
portnumberYesClickHouse HTTP interface port (8443 for HTTPS, 8123 for HTTP)
databasestringYesDatabase name to connect to
usernamestringYesClickHouse username
passwordstringNoClickHouse password
securebooleanNoUse a secure HTTPS connection (default: true)
querystringYesRaw SQL statement to execute

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayArray of rows returned from the statement
rowCountnumberNumber of rows returned or affected

clickhouse_insert

Insert a row into a ClickHouse table

Input

ParameterTypeRequiredDescription
hoststringYesClickHouse server hostname (e.g., your-instance.clickhouse.cloud)
portnumberYesClickHouse HTTP interface port (8443 for HTTPS, 8123 for HTTP)
databasestringYesDatabase name to connect to
usernamestringYesClickHouse username
passwordstringNoClickHouse password
securebooleanNoUse a secure HTTPS connection (default: true)
tablestringYesTable name to insert data into
dataobjectYesData object to insert (key-value pairs mapping column names to values)

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayInserted rows (empty for ClickHouse inserts)
rowCountnumberNumber of rows inserted

clickhouse_insert_rows

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_update

Update rows in a ClickHouse table via an ALTER TABLE ... UPDATE mutation

Input

ParameterTypeRequiredDescription
hoststringYesClickHouse server hostname (e.g., your-instance.clickhouse.cloud)
portnumberYesClickHouse HTTP interface port (8443 for HTTPS, 8123 for HTTP)
databasestringYesDatabase name to connect to
usernamestringYesClickHouse username
passwordstringNoClickHouse password
securebooleanNoUse a secure HTTPS connection (default: true)
tablestringYesTable name to update data in
dataobjectYesData object with fields to update (key-value pairs)
wherestringYesWHERE clause condition (without the WHERE keyword)

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayUpdated rows (empty for ClickHouse mutations)
rowCountnumberNumber of rows written by the mutation

clickhouse_delete

Delete rows from a ClickHouse table via an ALTER TABLE ... DELETE mutation

Input

ParameterTypeRequiredDescription
hoststringYesClickHouse server hostname (e.g., your-instance.clickhouse.cloud)
portnumberYesClickHouse HTTP interface port (8443 for HTTPS, 8123 for HTTP)
databasestringYesDatabase name to connect to
usernamestringYesClickHouse username
passwordstringNoClickHouse password
securebooleanNoUse a secure HTTPS connection (default: true)
tablestringYesTable name to delete data from
wherestringYesWHERE clause condition (without the WHERE keyword)

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayDeleted rows (empty for ClickHouse mutations)
rowCountnumberNumber of rows affected by the mutation

clickhouse_list_databases

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_list_tables

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_describe_table

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_show_create_table

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_count_rows

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_introspect

Introspect a ClickHouse database to retrieve table structures, columns, and engines

Input

ParameterTypeRequiredDescription
hoststringYesClickHouse server hostname (e.g., your-instance.clickhouse.cloud)
portnumberYesClickHouse HTTP interface port (8443 for HTTPS, 8123 for HTTP)
databasestringYesDatabase name to introspect
usernamestringYesClickHouse username
passwordstringNoClickHouse password
securebooleanNoUse a secure HTTPS connection (default: true)

Output

ParameterTypeDescription
messagestringOperation status message
tablesarrayArray of table schemas with columns and engines
namestringTable name
databasestringDatabase the table belongs to
enginestringTable engine (e.g., MergeTree, Log)
totalRowsnumberApproximate total number of rows in the table
columnsarrayTable columns
namestringColumn name
typestringClickHouse data type (e.g., UInt32, String, DateTime)
defaultKindstringKind of default expression (DEFAULT, MATERIALIZED, ALIAS)
defaultExpressionstringDefault value expression for the column
isInPrimaryKeybooleanWhether the column is part of the primary key
isInSortingKeybooleanWhether the column is part of the sorting key

clickhouse_create_database

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_drop_database

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_create_table

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_drop_table

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_truncate_table

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_rename_table

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_optimize_table

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_list_partitions

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_drop_partition

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_list_mutations

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_list_running_queries

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_kill_query

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_table_stats

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

clickhouse_list_clusters

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
messagestringSuccess or error message describing the operation outcome
rowsarrayArray of rows returned from the operation
rowCountnumberNumber of rows returned or affected by the operation
countnumberRow count (count rows operation)
ddlstringCREATE TABLE statement (show create table operation)
tablesarrayArray of table schemas with columns and engines (introspect operation)

On this page