tigergraph__delete_nodes
Delete multiple vertices from a TigerGraph graph by ID list or WHERE clause. Removes connected edges automatically; test with get_nodes or get_vertex_count before executing.
Instructions
Purpose: Delete multiple vertices (nodes) from the graph in a single operation.
When to Use:
Bulk deletion of vertices matching criteria
Delete specific set of vertices by IDs
Clear all vertices of a type
Data cleanup operations
Important Notes:
Warning: This operation is permanent and cannot be undone
Warning: Omitting WHERE will delete ALL vertices of the specified type
Connected edges will also be deleted (CASCADE behavior)
More efficient than multiple delete_node() calls
Usage Modes:
By WHERE clause:
delete_nodes(vertex_type='Person', where='age > 70')By ID list:
delete_nodes(vertex_type='Person', vertex_ids=['id1', 'id2'])Delete all:
delete_nodes(vertex_type='TempData')(no where/ids)
Safety Tips:
ALWAYS test WHERE clause with get_nodes() first
Use get_vertex_count() to verify expected deletion count
Consider backing up data before bulk deletions
Related Tools:
delete_node: Delete a single vertex
get_nodes: Preview vertices before deletion
get_vertex_count: Check deletion impact
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| where | No | Filter condition to select vertices to delete. Use TigerGraph WHERE syntax. Examples: - 'age > 70' - 'status == "inactive"' - 'created_date < "2020-01-01"' Warning: If omitted, ALL vertices of this type will be deleted! | |
| profile | No | Connection profile name. Omit to use the active default profile. Use 'list_connections' to see available profiles. | |
| graph_name | No | Name of the graph (uses default if not specified) | |
| vertex_ids | No | Optional list of specific vertex IDs to delete (alternative to WHERE clause) | |
| vertex_type | Yes | The type of vertices to delete |