Actions41
- Append
- Blocking Pop Left
- Blocking Pop Right
- Delete
- Eval
- Exists
- Expire At
- Get
- Get Set
- Hash Exists
- Hash Get
- Hash Keys
- Hash Length
- Hash Set
- Hash Values
- Increment
- Info
- Keys
- List Length
- List Range
- Multi Get
- Multi Hash Get
- Multi Mix Get
- Multi Mix Set
- Multi Set
- Persist
- Pop
- Publish
- Push
- Scan
- Set
- Set Add
- Set Cardinality
- Set Is Member
- Set Remove
- Sorted Set Add
- Sorted Set Cardinality
- Sorted Set Range
- Sorted Set Remove
- String Length
- TTL
Overview
The "Redis Enhanced" node provides a comprehensive interface to interact with a Redis database, supporting a wide range of Redis operations including string manipulation, list handling, set and sorted set management, hash operations, key scanning, and Lua script execution. It is designed for users who want to get, send, update, or manage data in Redis with enhanced capabilities beyond basic commands.
This node is beneficial in scenarios such as:
- Managing real-time data caches.
- Implementing message queues or pub/sub systems.
- Handling complex data structures like hashes, sets, and sorted sets.
- Performing atomic increments or conditional updates.
- Executing Lua scripts for advanced Redis logic.
Example use case:
Retrieve a range of members from a sorted set with their scores to analyze leaderboard rankings or time-series data stored in Redis.
Properties
| Name | Meaning |
|---|---|
| Sorted Set | The name of the sorted set to operate on. |
| Start | Start index (inclusive) for the range query in the sorted set. |
| Stop | Stop index (inclusive, -1 means the end) for the range query in the sorted set. |
| With Scores | Boolean flag indicating whether to include the scores along with the members in results. |
Note: These properties are specific to the "Sorted Set Range" operation under the default resource.
Output
The output JSON object contains:
sortedSet: The name of the sorted set queried.result: An array representing the members retrieved from the sorted set.- If
With Scoresis false, this is an array of member values (strings). - If
With Scoresis true, this is an array of objects each containing a member and its associated score.
- If
No binary data output is produced by this operation.
Example output:
{
"sortedSet": "leaderboard",
"result": [
{ "value": "player1", "score": 1500 },
{ "value": "player2", "score": 1450 }
]
}
or if With Scores is false:
{
"sortedSet": "leaderboard",
"result": ["player1", "player2"]
}
Dependencies
- Requires a Redis server connection configured via credentials that provide necessary authentication (e.g., API key or password).
- The node uses a Redis client library internally to communicate with the Redis instance.
- No additional external services are required.
Troubleshooting
- Invalid Score-Member Pairs: When adding members to a sorted set, ensure the score-member pairs are provided in even numbers; otherwise, an error will be thrown.
- Connection Issues: Errors related to connecting to Redis usually indicate incorrect credentials or network issues. Verify the Redis server address, port, and authentication details.
- JSON Parsing Errors: For some operations, values may be parsed as JSON. Invalid JSON strings will cause errors; ensure proper JSON formatting when enabling JSON parsing.
- Index Out of Range: For range queries, invalid start or stop indices might result in empty results or errors. Use valid indices within the sorted set bounds.