Redis is an open-source, in-memory data structure store, often referred to as a data structure server. RisingWave sinks data to Redis in the form of strings storing key-value pairs in the specified format (Documentation Index
Fetch the complete documentation index at: https://risingwavelabs-wyx-add-timestamp-dedicated-page.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
JSON or TEMPLATE), so a primary key must always be provided.
You can test out this process on your own device by using the redis-sink demo in the integration_test directory of the RisingWave repository.
Prerequisites
Before sinking data from RisingWave to Redis, please ensure the following:- The Redis database you want to sink to is accessible from RisingWave.
- Ensure you have an upstream materialized view or source in RisingWave that you can sink data from.
syntax
Parameters
| Name | Description |
|---|---|
| redis.url | Required. Choose either the Redis cluster address or a non-cluster Redis address.
|
| primary_key | Required. The primary keys of the sink. If necessary, use , to delimit the primary key columns. |
FORMAT and ENCODE options
These options should be set in
FORMAT data_format ENCODE data_encode (key = 'value'), instead of the WITH clause| Field | Notes |
|---|---|
| data_format | Data format. Allowed formats:
|
| data_encode | Data encoding. Supported encodings:
|
| force_append_only | If true, forces the sink to be PLAIN (also known as append-only), even if it cannot be. |
| key_format | Required if data_encode is TEMPLATE. Specify the format for the key as a string. |
| value_format | Required if data_encode is TEMPLATE. Specify the format for the value as a string. |
| key_encode | Optional.
|
Example
Assume we create a materialized view,bhv_mv, from a source.
bhv_mv to Redis by creating a sink. Here, data_encode is JSON.
bhv_mv to Redis by creating a sink. Here, data_encode is TEMPLATE, so key_format and value_format must be defined.