ClickHouse

App · Databases · 3 actions

Insert, update, and delete rows in your ClickHouse database tables.

Actions

ActionWhat it does
Delete rowsRemove the rows that match a filter.
Insert rowsAdd one or more rows to a table.
Update rowsChange column values on the rows that match a filter.

Delete rows

Remove the rows that match a filter. Provide the column/value conditions that pick which rows to delete. A non-empty filter is required so you never delete every row by accident.

Inputs

Databasedatabasetext
The database that contains the table. Pick one, or leave blank to use the connection's default database.
TabletabletextRequired
The table to act on. Pick a table, or type its name (for example 'events'). Choose a database first to load its tables.
Match rows wherefilterobjectRequired
Which rows to delete, as column/value pairs (for example, id: 42). A row is deleted only when it equals every value given (combined with AND). Must be non-empty; deleting every row is not allowed.

Outputs

databasetext
Database of the table (null when the default was used)
matched_bylist
Filter columns used to select rows
statustext
'applied' once ClickHouse has run the delete
tabletext
Table rows were deleted from
Example output
{
  "database": "default",
  "matched_by": [
    "id"
  ],
  "status": "applied",
  "table": "events"
}

Insert rows

Add one or more rows to a table. Each row is given as column/value pairs; columns you omit fall back to their defaults, so you only provide the columns you have values for.

Inputs

Databasedatabasetext
The database that contains the table. Pick one, or leave blank to use the connection's default database.
TabletabletextRequired
The table to act on. Pick a table, or type its name (for example 'events'). Choose a database first to load its tables.
RowsrowslistRequired
The rows to insert, as a list of objects. Each object maps column names to values, for example [{"id": 1, "name": "Ada"}, {"id": 2, "name": "Grace"}].

Outputs

databasetext
Database written to (null when the default was used)
inserted_rowsnumber
Number of rows sent to ClickHouse
tabletext
Table written to
Example output
{
  "database": "default",
  "inserted_rows": 2,
  "table": "events"
}

Update rows

Change column values on the rows that match a filter. Provide the new values to set and the column/value conditions that pick which rows to update. A non-empty filter is required so you never update every row by accident.

Inputs

Databasedatabasetext
The database that contains the table. Pick one, or leave blank to use the connection's default database.
TabletabletextRequired
The table to act on. Pick a table, or type its name (for example 'events'). Choose a database first to load its tables.
Set valuesassignmentsobjectRequired
The columns to change and their new values, as column/value pairs (for example, status: "archived", score: 10).
Match rows wherefilterobjectRequired
Which rows to update, as column/value pairs (for example, id: 42). A row is updated only when it equals every value given (combined with AND). Must be non-empty; updating every row is not allowed.

Outputs

databasetext
Database of the updated table (null when the default was used)
matched_bylist
Filter columns used to select rows
statustext
'applied' once ClickHouse has run the update
tabletext
Table that was updated
updated_columnslist
Columns whose values were set
Example output
{
  "database": "default",
  "matched_by": [
    "id"
  ],
  "status": "applied",
  "table": "events",
  "updated_columns": [
    "status"
  ]
}

On this page