ClickHouse

App · Databases · 4 actions

Find, insert, update, and delete rows in your ClickHouse database tables.

Actions

ActionWhat it does
Delete rowsRemove the rows that match a filter.
Find rowsRead rows from a table, optionally only those matching column/value conditions, sorted by a column.
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 default database saved when ClickHouse was connected.
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"
}

Find rows

Read rows from a table, optionally only those matching column/value conditions, sorted by a column. Returns up to 1,000 rows.

Inputs

Databasedatabasetext
The database that contains the table. Pick one, or leave blank to use the default database saved when ClickHouse was connected.
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 wherefilterobject
Only rows equal to every value given, as column/value pairs (for example, status: "paid"). Leave blank for any row.
Sort by columnorder_bytext
The column to sort by, such as created_at. Leave blank for ClickHouse's own order.
Sort directionsort_directiontext
Lowest first (ascending) or highest first (descending).One of: ASC (Ascending), DESC (Descending). Default: ASC.
Limitlimitnumber
The most rows to return, up to 1,000. Defaults to 100.From 1 to 1000.

Outputs

countnumber
Number of rows found
databasetext
Database read from (null when the default was used)
rowslist
The rows found, each as column/value pairs
tabletext
Table read from
Example output
{
  "count": 1,
  "database": "default",
  "rows": [
    {
      "id": 1,
      "name": "Ada"
    }
  ],
  "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 default database saved when ClickHouse was connected.
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 default database saved when ClickHouse was connected.
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