Help wanted!
The following content of this documentation page has been machine-translated. But unlike other websites, it is not done on the fly. This translated text lives on GitHub repository alongside main ClickHouse codebase and waits for fellow native speakers to make it more human-readable. You can also use the original English version as a reference.
外部辞書
さまざまなデータソースから独自の辞書を追加できます。 ディクショナリのデータソースには、ローカルテキストまたは実行可能ファイル、HTTPリソース、または別のDBMSを使用できます。 詳細については、 “外部辞書のソース”.
クリックハウス:
- 完全または部分的にRAMに辞書を格納します。
- 辞書を定期的に更新し、欠損値を動的に読み込みます。 つまり、辞書は動的に読み込むことができます。
- Xmlファイルで外部辞書を作成することができます。 DDLクエリ.
外部辞書の構成は、一つ以上のxmlファイルに配置できます。 設定へのパスは dictionaries_config パラメータ。
辞書は、サーバーの起動時または最初の使用時に読み込むことができます。 dictionaries_lazy_load 設定。
その 辞書 システムテーブルについての情報が含まれて辞書に設定されます。 各辞書については、そこにあります:
- 辞書の状態。
- 設定パラメータ。
- メトリクスのような量のメモリ割り当てのための辞書は多数のクエリからの辞書に成功したとみなされます。
辞書構成ファイルの形式は次のとおりです:
<yandex>
<comment>An optional element with any content. Ignored by the ClickHouse server.</comment>
<!--Optional element. File name with substitutions-->
<include_from>/etc/metrika.xml</include_from>
<dictionary>
<!-- Dictionary configuration. -->
<!-- There can be any number of <dictionary> sections in the configuration file. -->
</dictionary>
</yandex>
あなたはできる 設定 同じファイル内の任意の数の辞書。
辞書のDDLクエリ サーバー構成に追加のレコードは必要ありません。 この仕事を辞書として第一級の体のように、テーブルやビュー。
注意
小さな辞書の値を変換するには、次のように記述します SELECT
クエリ(参照 変換 機能)。 この機能は外部辞書とは関係ありません。