> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8a08bda2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Redis Dictionary ソース

> ClickHouse で Redis を Dictionary ソースとして設定します。

設定例:

<Tabs>
  <Tab title="DDL">
    ```sql theme={null}
    SOURCE(REDIS(
        host 'localhost'
        port 6379
        storage_type 'simple'
        db_index 0
    ))
    ```
  </Tab>

  <Tab title="設定ファイル">
    ```xml theme={null}
    <source>
        <redis>
            <host>localhost</host>
            <port>6379</port>
            <storage_type>simple</storage_type>
            <db_index>0</db_index>
        </redis>
    </source>
    ```
  </Tab>
</Tabs>

<br />

設定フィールド:

| 設定             | 説明                                                                                                                                                                        |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `host`         | Redis のホスト。                                                                                                                                                               |
| `port`         | Redis サーバーのポート。                                                                                                                                                           |
| `storage_type` | キーの操作に使用される Redis 内部ストレージの構造です。`simple` は単純なソースおよびハッシュ化された単一キーのソース用、`hash_map` は 2 つのキーを持つハッシュ化ソース用です。範囲付きソースおよび複合キーを持つ cache ソースはサポートされていません。デフォルト値は `simple` です。省略可能です。 |
| `db_index`     | Redis 論理データベースの数値インデックス。デフォルト値は `0` です。省略可能です。                                                                                                                            |
