Set a JSON type value for a given Redis key.
Set a JSON type value for a new key or update the current key value with a new one.
yaml
type: "io.kestra.plugin.redis.json.Set"
Set a JSON value.
yaml
id: redis_json_set
namespace: company.team
inputs:
- id: key_name
type: STRING
displayName: Key Name
- id: key_value
type: STRING
displayName: Key Value
tasks:
- id: set
type: io.kestra.plugin.redis.json.Set
url: redis://:redis@localhost:6379/0
key: "{{ inputs.key_name }}"
value: |
{
"name": "{{ inputs.key_value }}"
}
The redis key you want to set.
The connection string.
The value you want to set as type JSON.
Default
false
Define if you get the older value in response, does not work with Redis 5.X.
Default
{
"mustNotExist": "false",
"mustExist": "false"
}
Options available when setting a key in Redis.
See redis documentation.
Default
$
JSON path to extract value (default is root '$')
Old value
The old value if you replaced an existing key Required Get to true
Default
false
Only set the key if it already exist.
Default
false
Only set the key if it does not already exist.