RedisLoader

The RedisLoader writes processed rows into Redis by using one field as the key and another field as the value. It does not modify the rows and returns them unchanged.

Configuration

XPath

Type

Description

redis/@keyField

Attribute

Name of the field in the row to use as the Redis key.

redis/@valueField

Attribute

Name of the field in the row to use as the Redis value. Scalar values are cast to strings; arrays and objects are stored as JSON.

redis/@prefix

Attribute

Optional key prefix. When set, the final Redis key will be {prefix}:{key}.

Example

Input data

Row

sku

productAttributes

1

String: 101865

JSON: {"zerkleinerungsart": "Streifen"}

2

String: 101940

JSON: {"zerkleinerungsart": "Würfel"}

Pipeline configuration

<redis
    keyField="sku"
    valueField="productAttributes"
    prefix="springbok:product"
/>

Redis output

Conceptually, the loader writes the following entries to Redis:

Key

Value

springbok:product:101865

{"zerkleinerungsart":"Streifen"}

springbok:product:101940

{"zerkleinerungsart":"Würfel"}

Pipeline output

Row

sku

productAttributes

1

String: 101865

JSON: {"zerkleinerungsart": "Streifen"}

2

String: 101940

JSON: {"zerkleinerungsart": "Würfel"}