Overview
This node interacts with a Redis database, specifically performing operations related to keys. It supports retrieving keys matching a pattern and optionally fetching their values. This is useful for scenarios where you need to list keys in Redis and inspect their associated data, such as monitoring cache contents or debugging stored data.
Use Case Examples
- Retrieve all keys matching a pattern and get their values to analyze stored data.
- Fetch keys without values to get an overview of keys present in Redis matching a specific pattern.
Properties
| Name | Meaning |
|---|---|
| Connection Mode | How to manage Redis connections, either reusing connections for better performance or creating a new connection each time for safety. |
| Key Pattern | The key pattern used to filter which keys to return from Redis. |
| Get Values | Whether to retrieve the values of the matching keys along with the keys themselves. |
| Value Is JSON | Indicates if the value of a hash key is JSON or key-value pairs, affecting how the value is parsed and returned. |
Output
JSON
keys- List of keys matching the pattern when 'Get Values' is false.
- Key names as properties with their corresponding values when 'Get Values' is true.
Dependencies
- Requires a Redis connection credential with appropriate access to the Redis instance.
Troubleshooting
- Connection issues may occur if Redis credentials are incorrect or the Redis server is unreachable. Verify credentials and network connectivity.
- If the node fails to retrieve keys or values, ensure the key pattern is valid and that the Redis user has permission to access those keys.
- Errors during value retrieval may occur if the value format does not match the expected type (e.g., JSON parsing errors). Adjust 'Value Is JSON' setting accordingly.
Links
- Redis KEYS Command - Official Redis documentation for the KEYS command used to match keys by pattern.
- Redis GET Command - Official Redis documentation for the GET command to retrieve string values by key.