Redis
Redis source connector
Descriptionâ
Read data from Redis.
tip
Engine Supported and plugin name
- Spark: Redis
- Flink
Optionsâ
name | type | required | default value |
---|---|---|---|
host | string | no | "localhost" |
port | int | no | 6379 |
auth | string | no | |
db_num | int | no | 0 |
keys_or_key_pattern | string | yes | |
partition_num | int | no | 3 |
data_type | string | no | "KV" |
timeout | int | no | 2000 |
common-options | string | yes | |
is_self_achieved | boolean | no | false |
host [string]â
Redis server address, default "localhost"
port [int]â
Redis service port, default 6379
auth [string]â
Redis authentication password
db_num [int]â
Redis database index ID. It is connected to db 0
by default
keys_or_key_pattern [string]â
Redis Key, support fuzzy matching
partition_num [int]â
Number of Redis shards. The default is 3
data_type [string]â
Redis data type eg: KV HASH LIST SET ZSET
timeout [int]â
Redis timeout
common options [string]â
Source Plugin common parameters, refer to Source Plugin for details
is_self_achieved [boolean]â
If a redis access by a self-achieved redis proxy, which is not support redis function of "info Replication"
Exampleâ
redis {
host = "localhost"
port = 6379
auth = "myPassword"
db_num = 1
keys_or_key_pattern = "*"
partition_num = 20
data_type = "HASH"
result_table_name = "hash_result_table"
is_self_achieved = false
}
The returned table is a data table in which both fields are strings
raw_key | raw_message |
---|---|
keys | xxx |
my_keys | xxx |
keys_mine | xxx |