跳到主要内容
版本:2.3.0-beta

Redis

Redis source connector

Description

Read data from Redis.

提示

Engine Supported and plugin name

  • Spark: Redis
  • Flink

Options

nametyperequireddefault value
hoststringno"localhost"
portintno6379
authstringno
db_numintno0
keys_or_key_patternstringyes
partition_numintno3
data_typestringno"KV"
timeoutintno2000
common-optionsstringyes
is_self_achievedbooleannofalse

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_keyraw_message
keysxxx
my_keysxxx
keys_minexxx