mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-14 12:30:49 +00:00
0a4a5b36cc
* Additional .gitignore entries * Merge a bunch of small articles about system tables into single one * Merge a bunch of small articles about formats into single one * Adapt table with formats to English docs too * Add SPb meetup link to main page * Move Utilities out of top level of docs (the location is probably not yet final) + translate couple articles * Merge MacOS.md into build_osx.md * Move Data types higher in ToC * Publish changelog on website alongside documentation * Few fixes for en/table_engines/file.md * Use smaller header sizes in changelogs * Group up table engines inside ToC * Move table engines out of top level too * Specificy in ToC that query language is SQL based. Thats a bit excessive, but catches eye. * Move stuff that is part of query language into respective folder * Move table functions lower in ToC * Lost redirects.txt update * Do not rely on comments in yaml + fix few ru titles * Extract major parts of queries.md into separate articles * queries.md has been supposed to be removed * Fix weird translation * Fix a bunch of links * There is only table of contents left * "Query language" is actually part of SQL abbreviation * Change filename in README.md too * fix mistype
51 lines
3.5 KiB
Markdown
51 lines
3.5 KiB
Markdown
<a name="dicts-external_dicts"></a>
|
||
|
||
# Внешние словари
|
||
|
||
Существует возможность подключать собственные словари из различных источников данных. Источником данных для словаря может быть локальный текстовый/исполняемый файл, HTTP(s) ресурс или другая СУБД. Подробнее смотрите в разделе "[Источники внешних словарей](external_dicts_dict_sources.md#dicts-external_dicts_dict_sources)".
|
||
|
||
ClickHouse:
|
||
|
||
- Полностью или частично хранит словари в оперативной памяти.
|
||
- Периодически обновляет их и динамически подгружает отсутствующие значения. Т.е. словари можно подгружать динамически.
|
||
|
||
Конфигурация внешних словарей находится в одном или нескольких файлах. Путь к конфигурации указывается в параметре [dictionaries_config](../../operations/server_settings/settings.md#server_settings-dictionaries_config).
|
||
|
||
Словари могут загружаться при старте сервера или при первом использовании, в зависимости от настройки [dictionaries_lazy_load](../../operations/server_settings/settings.md#server_settings-dictionaries_lazy_load).
|
||
|
||
Конфигурационный файл словарей имеет вид:
|
||
|
||
```xml
|
||
<yandex>
|
||
<comment>Необязательный элемент с любым содержимым. Игнорируется сервером ClickHouse.</comment>
|
||
|
||
<!--Необязательный элемент, имя файла с подстановками-->
|
||
<include_from>/etc/metrika.xml</include_from>
|
||
|
||
|
||
<dictionary>
|
||
<!-- Конфигурация словаря -->
|
||
</dictionary>
|
||
|
||
...
|
||
|
||
<dictionary>
|
||
<!-- Конфигурация словаря -->
|
||
</dictionary>
|
||
</yandex>
|
||
```
|
||
|
||
В одном файле можно [сконфигурировать](external_dicts_dict.md#dicts-external_dicts_dict) произвольное количество словарей. Формат файла сохраняется даже если словарь один (т.е. `<yandex><dictionary> <!--configuration--> </dictionary></yandex>`).
|
||
|
||
>Вы можете преобразовывать значения по небольшому словарю, описав его в запросе `SELECT` (см. функцию [transform](../functions/other_functions.md#other_functions-transform)). Эта функциональность не связана с внешними словарями.
|
||
|
||
|
||
Смотрите также:
|
||
|
||
- [Настройка внешнего словаря](external_dicts_dict.md#dicts-external_dicts_dict)
|
||
- [Хранение словарей в памяти](external_dicts_dict_layout.md#dicts-external_dicts_dict_layout)
|
||
- [Обновление словарей](external_dicts_dict_lifetime#dicts-external_dicts_dict_lifetime)
|
||
- [Источники внешних словарей](external_dicts_dict_sources.md#dicts-external_dicts_dict_sources)
|
||
- [Ключ и поля словаря](external_dicts_dict_structure.md#dicts-external_dicts_dict_structure)
|
||
- [Функции для работы с внешними словарями](../functions/ext_dict_functions.md#ext_dict_functions)
|