DataStore Update
Update existing data in your built-in DataStore. Use this node to modify rows in any table you have created in Database Studio.
Configuration
| Field | Description | Notes |
|---|---|---|
| Table | The DataStore table to update | Select from a list of your existing tables. |
| Update Fields Mapping | Map new values to table columns | Each mapping entry has a Column (the column to update) and an Input (the new value, which can reference upstream data using expressions). |
| WHERE Conditions | Filter which rows to update | Add one or more conditions to target specific rows. See Where Conditions below. |
| Allow NULL Values | Whether to include null or empty values in the update | Disabled by default. When disabled, columns mapped to null or empty values are skipped. |
| Require WHERE Conditions | Whether WHERE conditions are mandatory | Enabled by default. Prevents accidental updates to 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 update every row in the table. Only disable this when you intentionally want to modify all rows.
Output
| Field | Description |
|---|---|
success | true if the update succeeded |
table | The name of the table |
affected_rows | The number of rows that were updated |
updated_data | An object containing the values that were set |
updated_records | A list of the full row data after the update was applied |
TIP
To update a customer's email address, set the WHERE Conditions to match id equals {{customer_id}} and map the email column to the new email value from an upstream node.