ClickHouse
App · Databases · 4 actions
Find, insert, update, and delete rows in your ClickHouse database tables.
Actions
| Action | What it does |
|---|---|
| Delete rows | Remove the rows that match a filter. |
| Find rows | Read rows from a table, optionally only those matching column/value conditions, sorted by a column. |
| Insert rows | Add one or more rows to a table. |
| Update rows | Change 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
- Database
databasetext - The database that contains the table. Pick one, or leave blank to use the default database saved when ClickHouse was connected.
- Table
tabletextRequired - 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 where
filterobjectRequired - 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
- Database
databasetext - The database that contains the table. Pick one, or leave blank to use the default database saved when ClickHouse was connected.
- Table
tabletextRequired - 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 where
filterobject - Only rows equal to every value given, as column/value pairs (for example, status: "paid"). Leave blank for any row.
- Sort by column
order_bytext - The column to sort by, such as created_at. Leave blank for ClickHouse's own order.
- Sort direction
sort_directiontext - Lowest first (ascending) or highest first (descending).One of:
ASC(Ascending),DESC(Descending). Default:ASC. - Limit
limitnumber - 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
- Database
databasetext - The database that contains the table. Pick one, or leave blank to use the default database saved when ClickHouse was connected.
- Table
tabletextRequired - The table to act on. Pick a table, or type its name (for example 'events'). Choose a database first to load its tables.
- Rows
rowslistRequired - 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
- Database
databasetext - The database that contains the table. Pick one, or leave blank to use the default database saved when ClickHouse was connected.
- Table
tabletextRequired - The table to act on. Pick a table, or type its name (for example 'events'). Choose a database first to load its tables.
- Set values
assignmentsobjectRequired - The columns to change and their new values, as column/value pairs (for example, status: "archived", score: 10).
- Match rows where
filterobjectRequired - 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"
]
}