Sources for external dictionaries”.
The configuration of external dictionaries can be located in one or more xml-files. The path to the configuration is specified in the dictionaries_config parameter.
Dictionaries can be loaded at server startup or at first use, depending on the dictionaries_lazy_load setting.
The dictionary configuration file has the following format:
<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>
You can configure any number of dictionaries in the same file.
DDL queries for dictionaries doesn’t require any additional records in server configuration. They allow to work with dictionaries as first-class entities, like tables or views.
You can convert values for a small dictionary by describing it in a
SELECT query (see the transform function). This functionality is not related to external dictionaries.