DataStore Delete
Delete data from your built-in DataStore. Use this node to remove rows from any table you have created in Database Studio.
Configuration
| Field | Description | Notes |
|---|---|---|
| Table | The DataStore table to delete from | Select from a list of your existing tables. |
| WHERE Conditions | Filter which rows to delete | Add one or more conditions to target specific rows. See Where Conditions below. |
| Require WHERE Conditions | Whether WHERE conditions are mandatory | Enabled by default. Prevents accidental deletion of all rows in the table. |
Where Conditions
The Where field lets you build filter conditions without writing SQL. Each condition has three parts:
- Column -- The column to filter on.
- Operation -- The comparison operator (equals, not equals, greater than, less than, contains, starts with, ends with, in, not in, is null, is not null, is empty, is not empty).
- Value -- The value to compare against. Supports referencing data from upstream nodes using expressions.
You can combine multiple conditions with AND or OR logic.
WARNING
Disabling Require WHERE Conditions allows the node to delete every row in the table. Only disable this when you intentionally want to clear all data.
Output
| Field | Description |
|---|---|
success | true if the delete succeeded |
table | The name of the table |
affected_rows | The number of rows that were deleted |
deleted_records | A list of the full row data that was deleted |
TIP
To clean up old records, set the WHERE Conditions to a date column with the less than operator and provide a cutoff date from an upstream node.