Workflows
Blocks
Integrations
ClickHouse

ClickHouse Action Block

What it does: Runs SQL against a ClickHouse database over its HTTP interface — analytical queries, bulk inserts, and schema management — and returns structured rows to your workflow.

⚡

In simple terms: Point the block at your ClickHouse Cloud or self-hosted endpoint, write SQL, and get back rows, columns, and a rowCount you can feed into an LLM, a report, or another block.

Credentials

FieldRequiredDescription
HTTP URLYesHTTP interface endpoint, e.g. https://abc.us-east-1.aws.clickhouse.cloud:8443. The protocol defaults to https if you omit it. Self-hosted instances usually listen on port 8123.
UsernameNoClickHouse user (often default). Sent as the X-ClickHouse-User header.
PasswordNoSent as the X-ClickHouse-Key header.
Default databaseNoUsed whenever a block does not set its own Database field.

In ClickHouse Cloud, find these under your service → Connect → HTTPS.

Actions

ActionWhat it doesOutput
Run QueryExecutes any SQL statement with optional server-side parameters{ rows, columns, rowCount, statistics, raw }
Insert RowsInserts a JSON array of objects via INSERT INTO … FORMAT JSONEachRow{ inserted, table, raw }
List DatabasesSHOW DATABASES{ rows, columns, rowCount }
List TablesSHOW TABLES FROM <database>{ rows, columns, rowCount }
Describe TableDESCRIBE TABLE <database>.<table>{ rows, columns, rowCount }
Create TableRuns your raw DDL, or builds a CREATE TABLE from table + schema fields + engine + order by{ created, statement, raw }
Truncate TableTRUNCATE TABLE IF EXISTS — requires confirmation{ table, statement, raw }
Drop TableDROP TABLE IF EXISTS — requires confirmation{ table, statement, raw }
PingGET /ping to verify connectivity{ ok, status, response }

Fields

FieldUsed byDescription
queryRun QueryThe SQL statement.
paramsRun QueryJSON object of parameters, sent as param_<name>.
databasemost actionsDatabase name — falls back to the credential's default.
tableInsert / Describe / Create / Truncate / DropTable name, optionally database.table.
rowsInsert RowsJSON array of row objects.
ddlCreate TableRaw CREATE TABLE statement (takes precedence).
schemaFieldsCreate Table{"id":"UInt64","name":"String"} or [{ "name": "id", "type": "UInt64" }].
engineCreate TableTable engine, defaults to MergeTree.
orderByCreate TableORDER BY expression, defaults to tuple().
confirmTruncate / DropMust exactly match the table name.
maxRowsRun QueryCaps the result set (max_result_rows).
formatRun QueryClickHouse output format, defaults to JSON.

Query parameters

ClickHouse binds parameters server-side, which keeps interpolated workflow variables out of the SQL text:

SELECT event, count() AS total
FROM events
WHERE user_id = {uid:UInt64} AND event = {name:String}
GROUP BY event

With Params:

{ "uid": "42", "name": "purchase" }

Tips

  • Database and table names are validated: only letters, digits and underscores (plus one dot for database.table) are accepted. query and ddl are intentionally raw — they are your own SQL.
  • Truncate and Drop refuse to run unless Confirm matches the table name exactly.
  • Setting Format to something other than JSON (e.g. CSV, TSV) returns the response body in raw instead of parsed rows.
  • Use Max Rows on exploratory queries so a wide SELECT * cannot flood the workflow output.
Indite Documentation v1.7.1
PrivacyTermsSupport