Redis Client

Download 1
Last updated Nov 18, 2026

redis-del-batch

Delete the key of the key field from a Redis connect profile for each input row.

Syntax

redis-del-batch profile=STRING key=STRING

Options

profile=STRING
Required. Name of the Redis connect profile. Either a Redis Client (Standalone) or a Redis Client (Sentinel) profile is accepted. Example: profile=my_redis
key=STRING
Required. Name of the input field holding the Redis key to DEL. Example: key=user_id

Input fields

FieldTypeRequiredDescription
Field named by the key optionStringYRedis key to delete

Output fields

FieldTypeNameDescription
deletedIntegerDeletedNumber of deleted keys. 0 if the key did not exist
_errorStringErrorError message for DEL failure of the row. Absent on success

All fields of the input row are passed through unchanged, and the deleted or _error field is added.

Error codes

Parse errors

Error messageCauseResolution
No available Redis profileNo profile with the given name exists, or the current account is not granted access to it.Check the profile name and grant the account access to the profile.
profile option is requiredThe profile option is missing or empty.Specify profile=profile_name.
key option is requiredThe key option is missing or empty.Specify key=field_name.

Runtime errors

Error messageCauseResolution
(_error field of the output row)A Redis error occurred while processing the row, such as a connection failure, authentication failure, timeout or WRONGTYPE. The query does not abort; the _error field is added to the row. If the connection fails, every row gets the same error.Check the message in the _error field, the connection settings and the key type.
missing field_name(key) fieldThe field named by the key option does not exist in the input row.Check that the input row has the field.

Description

For each incoming row, the Redis DEL command is run with the value of the key field as the key, and the number of deleted keys is added as the deleted field. The connection is opened once when the query starts and reused for all rows.

A key that does not exist is not an error; it is recorded as deleted=0. Deletion cannot be undone, so check the target keys with a lookup before running it.

Examples

Example: Deleting a session key

Situation: Delete the session key of a user ID.

json "{}"
| eval session_key="session:1001"
| redis-del-batch profile=my_redis key=session_key

Expected result:

session_keydeleted
session:10011

Interpretation: deleted of 0 means the key was already gone.