mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 19:42:00 +00:00
1.5 KiB
1.5 KiB
slug | machine_translated | machine_translated_rev | sidebar_position | sidebar_label |
---|---|---|---|---|
/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict | true | 72537a2d52 |
40 | 配置外部字典 |
配置外部字典
如果使用xml文件配置字典,则比字典配置具有以下结构:
<dictionary>
<name>dict_name</name>
<structure>
<!-- Complex key configuration -->
</structure>
<source>
<!-- Source configuration -->
</source>
<layout>
<!-- Memory layout configuration -->
</layout>
<lifetime>
<!-- Lifetime of dictionary in memory -->
</lifetime>
</dictionary>
相应的 DDL-查询 具有以下结构:
CREATE DICTIONARY dict_name
(
... -- attributes
)
PRIMARY KEY ... -- complex or single key configuration
SOURCE(...) -- Source configuration
LAYOUT(...) -- Memory layout configuration
LIFETIME(...) -- Lifetime of dictionary in memory