ClickHouse icon

ClickHouse

Query, insert, update, delete, and manage ClickHouse tables. Supports AI agent tool use with schema discovery, auto-pagination for large results, and parameterized queries.

Insert

AI-generated

Summary

Insert rows into a ClickHouse table

Inputs

  • table (required) — The target ClickHouse table name or ID.
  • chunkSize — Number of rows to insert per HTTP request, default 1000.
  • columnMapping — Maps n8n field names to ClickHouse column names; empty means use field names directly.
  • database — Optional database override; defaults to credential's database.
  • onlyMapped — If true, only explicitly mapped columns are included in the insert.

Output shape

A single item indicating success and the number of inserted rows.

When continueOnFail is disabled, errors throw; otherwise the node may output an error object with details.

Examples

Example 1: Insert user records into table `users` with automatic chunking.

Table: users; chunkSize: 500; columnMapping: { sourceField: "name", targetColumn: "username" }

Example 2: Insert data into a different database using override.

Table: orders; database: "analytics"; onlyMapped: true

Example 3: Insert with explicit column mapping and force chunk size.

Table: products; chunkSize: 2000; columnMapping: { mappings: [{ sourceField: "id", targetColumn: "product_id" }, { sourceField: "price", targetColumn: "price" }] }

Links

Discussion