Redis Lookup
The Redis Lookup processor performs key-value lookups in Redis and passes the lookup values to fields. For information about supported versions, see Supported Systems and Versions.
Use the Redis Lookup to enrich records with additional data. For example, you can
configure the processor to use a city field as the key to look up zip code values in
Redis, and pass the values to a new zip_code
output field.
When you configure the Redis Lookup processor, you specify whether the processor performs a bulk lookup of all keys in a batch, or performs an individual lookup of each key in a record. You use an expression to define the key to look up in Redis, and specify the output field to write the lookup values to. You also specify the data type of the Redis value.
You can configure the processor to locally cache the key-value pairs to improve performance.
You specify properties to connect to Redis, including the URI of the Redis server. You can also use a connection to configure the processor.
Data Types
When you define the key to look up in Redis, you specify the data type of the Redis value. The Redis Lookup processor converts the Redis data type to a Data Collector data type.
Redis Data Type | Data Collector Data Type |
---|---|
String | String |
List | List. Converts the data to an indexed list of values, for example:
|
Hash | Map. Converts the data to a map of the Redis field names and values, for example:
|
Set | List. Converts the data to an indexed list of values, for example:
|
Lookup Cache
To improve pipeline performance, you can configure the Redis Lookup processor to locally cache the key-value pairs returned from Redis.
The processor caches key-value pairs until the cache reaches the maximum size or the expiration time. When the first limit is reached, the processor evicts key-value pairs from the cache.
- Size-based eviction
- Configure the maximum number of key-value pairs that the processor caches. When the maximum number is reached, the processor evicts the oldest key-value pairs from the cache.
- Time-based eviction
- Configure the amount of time that a key-value pair can remain in the cache without being written to or accessed. When the expiration time is reached, the processor evicts the key from the cache. The eviction policy determines whether the processor measures the expiration time since the last write of the value or since the last access of the value.
When you stop the pipeline, the processor clears the cache.
Configuring a Redis Lookup Processor
Configure a Redis Lookup processor to perform key-value lookups in Redis.