Skip to main content
Version: ACE 4

Redis Step

Overview

Redis step is used to access Redis database and make queries on the database

Configuration

  • Connection string - the Redis connection string example: redis[s]://[[username][:password]@][host][:port][/db-number]
  • Use TLS - flag, to be set to true if redis is tls enabled.
  • TLS Key - TLS private key string. Suggested apporach is to use environment variable.
  • TLS Cert - TLS cert string. Suggested apporach is to use environment variable.
  • TLS CA - TLS CA string. Suggested apporach is to use environment variable.
  • Configuration - list of queries to be made
    • action - the action to preform - currently supported are get, set, delete and custom methods
    • target path - the doc node on which to attach the result of query
    • payload - used in custom method to specify witch Redis method should be executed example: ["SET", "key", "value"]
    • options - used to provide additional options for method
    • key - key to be saved in database also used to find existing key value pair in database
    • value - value to be saved in database
    • doJsonStringify - specify if value that will be saved in database should be stringified (this should be true for all values that are not strings)
    • doJsonParse - specify if returned value should be parsed (this is mandatory for all values that where stringified before saving)
info

Below is a suggested approach to define the tls Key, Cert and CA.

{{$env.REDIS_CACHE_TLS_KEY}}

info

Find ways to use additional options here Redis-node documentation

For full list of Redis commands refer to Redis commands

Examples

GET

Redis step get configuration
 {
"stepType": "redis",
"color": "rgb(95, 206, 165)",
"displayName": "Redis",
"isSelected": true,
"config": {
"actions": [
{
"action": "get",
"options": {},
"key": "test",
"target": "result",
"doJsonParse": false
}
]
},
"connectionString": "redis://127.0.0.1:6379"
}
]
}
Flow Result
{
"doc": {
"result": "test"
},
"errors": [],
"performance": {
"steps": [
{
"step": "redis",
"executionTime": 25
}
],
"executionTimeOfFlow": 26,
"timeMetric": "ms"
}
}
Redis GET Flow Example
{
"flow": {
"name": "redisGet",
"description": "",
"steps": [
{
"stepType": "redis",
"color": "rgb(95, 206, 165)",
"displayName": "Redis",
"isSelected": true,
"config": {
"actions": [
{
"action": "get",
"options": {},
"key": "test",
"target": "result",
"doJsonParse": false
}
]
},
"connectionString": "redis://127.0.0.1:6379"
}
]
},
"tags": [
"general"
],
"inputSchema": {},
"inputSchemaLabel": "",
"version": 1,
"id": "21dd97e5-8fad-4a31-8faf-8f9693079a8a"
}

SET

Redis step set configuration
 {
"stepType": "redis",
"color": "rgb(95, 206, 165)",
"displayName": "Redis",
"isSelected": true,
"config": {
"actions": [
{
"action": "set",
"options": {},
"key": "test",
"value": "test",
"target": "result",
"doJsonStringify": false
}
]
},
"connectionString": "redis://127.0.0.1:6379"
}
]
}
Flow Result
{
"doc": {
"result": "OK"
},
"errors": [],
"performance": {
"steps": [
{
"step": "redis",
"executionTime": 25
}
],
"executionTimeOfFlow": 26,
"timeMetric": "ms"
}
}
Redis SET Flow Example
{
"flow": {
"name": "redisSet",
"description": "",
"steps": [
{
"stepType": "redis",
"color": "rgb(95, 206, 165)",
"displayName": "Redis",
"isSelected": true,
"config": {
"actions": [
{
"action": "set",
"options": {},
"key": "test",
"value": "test",
"target": "result",
"doJsonStringify": false
}
]
},
"connectionString": "redis://127.0.0.1:6379"
}
]
},
"tags": [
"general"
],
"inputSchema": {},
"inputSchemaLabel": "",
"version": 1,
"id": "21dd97e5-8fad-4a31-8faf-8f9693079a8a"
}

DELETE

Redis step delete configuration
 {
"stepType": "redis",
"color": "rgb(95, 206, 165)",
"displayName": "Redis",
"isSelected": true,
"config": {
"actions": [
{
"action": "delete",
"options": {},
"key": "test",
"target": "result"
}
]
},
"connectionString": "redis://127.0.0.1:6379"
}
]
}
Flow Result
{
"doc": {
"result": 1
},
"errors": [],
"performance": {
"steps": [
{
"step": "redis",
"executionTime": 25
}
],
"executionTimeOfFlow": 26,
"timeMetric": "ms"
}
}
Redis DELETE Flow Example
{
"flow": {
"name": "redisDelete",
"description": "",
"steps": [
{
"stepType": "redis",
"color": "rgb(95, 206, 165)",
"displayName": "Redis",
"isSelected": true,
"config": {
"actions": [
{
"action": "delete",
"options": {},
"key": "test",
"target": "result"
}
]
},
"connectionString": "redis://127.0.0.1:6379"
}
]
},
"tags": [
"general"
],
"inputSchema": {},
"inputSchemaLabel": "",
"version": 1,
"id": "21dd97e5-8fad-4a31-8faf-8f9693079a8a"
}

CUSTOM

Redis step custom configuration
 {
"stepType": "redis",
"color": "rgb(95, 206, 165)",
"displayName": "Redis",
"isSelected": true,
"config": {
"actions": [
{
"action": "custom",
"options": {},
"payload": ["SET", "key", "value"],
"target": "result"
}
]
},
"connectionString": "redis://127.0.0.1:6379"
}
]
}
Flow Result
{
"doc": {
"result": "OK"
},
"errors": [],
"performance": {
"steps": [
{
"step": "redis",
"executionTime": 25
}
],
"executionTimeOfFlow": 26,
"timeMetric": "ms"
}
}
Redis CUSTOM Flow Example
{
"flow": {
"name": "redisCustom",
"description": "",
"steps": [
{
"stepType": "redis",
"color": "rgb(95, 206, 165)",
"displayName": "Redis",
"isSelected": true,
"config": {
"actions": [
{
"action": "custom",
"options": {},
"payload": ["SET", "key", "value"],
"target": "result"
}
]
},
"connectionString": "redis://127.0.0.1:6379"
}
]
},
"tags": [
"general"
],
"inputSchema": {},
"inputSchemaLabel": "",
"version": 1,
"id": "21dd97e5-8fad-4a31-8faf-8f9693079a8a"
}