Back to Clickhouse

Redis dictionary source

docs/en/sql-reference/statements/create/dictionary/sources/redis.md

26.4.1.1-new1.0 KB
Original Source

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

Example of settings:

<Tabs> <TabItem value="ddl" label="DDL" default>
sql
SOURCE(REDIS(
    host 'localhost'
    port 6379
    storage_type 'simple'
    db_index 0
))
</TabItem> <TabItem value="xml" label="Configuration file">
xml
<source>
    <redis>
        <host>localhost</host>
        <port>6379</port>
        <storage_type>simple</storage_type>
        <db_index>0</db_index>
    </redis>
</source>
</TabItem> </Tabs>

Setting fields:

SettingDescription
hostThe Redis host.
portThe port on the Redis server.
storage_typeThe structure of internal Redis storage using for work with keys. simple is for simple sources and for hashed single key sources, hash_map is for hashed sources with two keys. Ranged sources and cache sources with complex key are unsupported. Default value is simple. Optional.
db_indexThe specific numeric index of Redis logical database. Default value is 0. Optional.