Delete Data

Action ID: delete_dataset_rows

Description

Delete rows from a dataset that match filter conditions.

Input Parameters

Name
Type
Required
Default
Description

dataset

dropdown

βœ“

-

The dataset to delete rows from.

conditions

array

-

[]

Filter conditions to select rows to delete (empty = delete all rows).

logic

dropdown

-

and

How to combine filter conditions (AND/OR). Options: and, or

Filter Condition Structure

Each condition in the conditions array contains:

Field
Type
Description

column

string

Column name to filter by

operator

dropdown

Comparison operator: equals, not_equals, contains, greater_than, less_than, in

value

string

Value to compare against. For 'in' operator, provide comma-separated values or JSON array

chevron-rightView JSON Schemahashtag
{
  "description": "Delete Dataset Rows node input.",
  "properties": {
    "dataset": {
      "description": "The dataset to delete rows from.",
      "title": "Dataset",
      "type": "string"
    },
    "conditions": {
      "default": [],
      "description": "Filter conditions to select rows to delete (empty = delete all rows).",
      "items": {
        "properties": {
          "column": {
            "description": "Column name to filter by",
            "title": "Column",
            "type": "string"
          },
          "operator": {
            "default": "equals",
            "description": "Comparison operator",
            "enum": ["equals", "not_equals", "contains", "greater_than", "less_than", "in"],
            "title": "Operator",
            "type": "string"
          },
          "value": {
            "description": "Value to compare against. For 'in' operator, provide comma-separated values or JSON array",
            "title": "Value",
            "type": "string"
          }
        },
        "required": ["column", "value"],
        "type": "object"
      },
      "title": "Filter Conditions",
      "type": "array"
    },
    "logic": {
      "default": "and",
      "description": "How to combine filter conditions (AND/OR).",
      "enum": ["and", "or"],
      "title": "Logic Operator",
      "type": "string"
    }
  },
  "required": ["dataset"],
  "title": "DeleteDatasetRowsNodeInput",
  "type": "object"
}

Output Parameters

Name
Type
Description

deleted_count

integer

Number of rows that were deleted.

chevron-rightView JSON Schemahashtag

How It Works

This node deletes rows from a dataset based on filter conditions. It evaluates each row against the specified conditions using the chosen logic operator (AND/OR). Matching rows are permanently removed from the dataset. The node validates the dataset ID format (26-character ULID) before execution and returns the count of deleted rows. If no conditions are provided, all rows in the dataset will be deleted.

Usage Examples

Example 1: Delete Inactive Users

Input:

Output:

Example 2: Delete Old Records

Input:

Output:

Example 3: Delete Multiple Status Types

Input:

Output:

Example 4: Delete with Multiple Conditions (AND)

Input:

Output:

Example 5: Delete with OR Logic

Input:

Output:

Common Use Cases

  • Data Cleanup: Remove outdated, invalid, or obsolete records from datasets

  • User Management: Delete inactive or suspended user accounts

  • Compliance: Remove data past retention period for GDPR/privacy compliance

  • Quality Control: Delete records that failed validation or processing

  • Batch Operations: Remove multiple records matching specific criteria in one operation

  • Status-Based Deletion: Clean up records in terminal states like "completed", "failed", or "cancelled"

  • Archive Management: Remove archived records from active datasets

  • Test Data Cleanup: Clear test or demo data from production datasets

Error Handling

Error Type
Cause
Solution

Dataset Not Found

Dataset ID doesn't exist

Verify the dataset ID is correct and the dataset exists

Invalid Dataset ID

Dataset ID format is incorrect

Ensure dataset ID is a 26-character ULID

Dataset ID Required

Dataset parameter is empty

Provide a valid dataset ID

Invalid Column

Column name doesn't exist in dataset

Check the dataset schema for available column names

Invalid Operator

Operator not in allowed list

Use: equals, not_equals, contains, greater_than, less_than, in

Malformed Condition

Missing required fields

Ensure each condition has column, operator, and value

Permission Denied

Insufficient permissions

Verify you have delete permissions on the dataset

Delete Failed

Server error during deletion

Retry the operation or check server logs

Notes

  • Permanent Operation: Deleted rows cannot be recovered. Use with caution and consider backing up data first.

  • Empty Conditions Warning: If conditions array is empty, ALL rows in the dataset will be deleted. Double-check before execution.

  • Validation: The node validates dataset ID format (must be 26-character ULID) before attempting deletion.

  • Atomic Operation: The delete operation is atomic, ensuring data consistency.

  • Performance: Deleting large numbers of rows may take time. Monitor the deleted_count in the output.

  • Filter First: Consider using the Query Data node to preview matching rows before deletion.

  • Audit Trail: Keep logs of delete operations for compliance and troubleshooting purposes.

  • Conditional Logic: Use AND logic to narrow down deletion criteria, OR logic to broaden the scope.

  • Batch Processing: For very large deletions, consider breaking them into smaller batches to avoid timeout issues.

  • Dependencies: Ensure no other workflows or processes depend on the rows being deleted.

  • Cascade Effects: Be aware of any relationships or references that might be affected by row deletion.

Last updated