Redis Advanced icon

Redis Advanced

Get, send and update data in Redis with enhanced operations

Set Cardinality

AI-generated

Summary

Get the number of members in a specified Redis set.

Inputs

  • Set (required) — Name of the set whose cardinality is to be retrieved.

Output shape

a list with one item per input containing a JSON object with the set name and its member count

The output JSON includes 'set' (the set name) and 'cardinality' (number of members). Errors result in workflow failure or an error object if 'continueOnFail' is enabled.

Examples

Example 1: Retrieve the number of members in a user group set called 'active_users' to monitor group size.

Set=active_users

Discussion