mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-19 21:03:51 +00:00
8623cb232c
* CLICKHOUSE-4063: less manual html @ index.md * CLICKHOUSE-4063: recommend markdown="1" in README.md * CLICKHOUSE-4003: manually purge custom.css for now * CLICKHOUSE-4064: expand <details> before any print (including to pdf) * CLICKHOUSE-3927: rearrange interfaces/formats.md a bit * CLICKHOUSE-3306: add few http headers * Remove copy-paste introduced in #3392 * Hopefully better chinese fonts #3392 * get rid of tabs @ custom.css * Apply comments and patch from #3384 * Add jdbc.md to ToC and some translation, though it still looks badly incomplete * minor punctuation * Add some backlinks to official website from mirrors that just blindly take markdown sources * Do not make fonts extra light * find . -name '*.md' -type f | xargs -I{} perl -pi -e 's//g' {} * find . -name '*.md' -type f | xargs -I{} perl -pi -e 's/ sql/g' {} * Remove outdated stuff from roadmap.md * Not so light font on front page too * Refactor Chinese formats.md to match recent changes in other languages
46 lines
2.1 KiB
Markdown
46 lines
2.1 KiB
Markdown
<a name="dicts-external_dicts"></a>
|
|
|
|
# External Dictionaries
|
|
|
|
You can add your own dictionaries from various data sources. The data source for a dictionary can be a local text or executable file, an HTTP(s) resource, or another DBMS. For more information, see "[Sources for external dictionaries](external_dicts_dict_sources.md#dicts-external_dicts_dict_sources)".
|
|
|
|
ClickHouse:
|
|
|
|
> - Fully or partially stores dictionaries in RAM.
|
|
- Periodically updates dictionaries and dynamically loads missing values. In other words, dictionaries can be loaded dynamically.
|
|
|
|
The configuration of external dictionaries is located in one or more files. The path to the configuration is specified in the [dictionaries_config](../../operations/server_settings/settings.md#server_settings-dictionaries_config) parameter.
|
|
|
|
Dictionaries can be loaded at server startup or at first use, depending on the [dictionaries_lazy_load](../../operations/server_settings/settings.md#server_settings-dictionaries_lazy_load) setting.
|
|
|
|
The dictionary config file has the following format:
|
|
|
|
```xml
|
|
<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 -->
|
|
</dictionary>
|
|
|
|
...
|
|
|
|
<dictionary>
|
|
<!-- Dictionary configuration -->
|
|
</dictionary>
|
|
</yandex>
|
|
```
|
|
|
|
You can [configure](external_dicts_dict.md#dicts-external_dicts_dict) any number of dictionaries in the same file. The file format is preserved even if there is only one dictionary (i.e. `<yandex><dictionary> <!--configuration -> </dictionary></yandex>` ).
|
|
|
|
See also "[Functions for working with external dictionaries](../functions/ext_dict_functions.md#ext_dict_functions)".
|
|
|
|
!!! attention
|
|
You can convert values for a small dictionary by describing it in a `SELECT` query (see the [transform](../functions/other_functions.md#other_functions-transform) function). This functionality is not related to external dictionaries.
|
|
|
|
[Original article](https://clickhouse.yandex/docs/en/query_language/dicts/external_dicts/) <!--hide-->
|