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.

Help ClickHouse documentation by editing this page

配置外部字典

如果使用xml文件配置字典,则比字典配置具有以下结构:

  1. <dictionary>
  2. <name>dict_name</name>
  3. <structure>
  4. <!-- Complex key configuration -->
  5. </structure>
  6. <source>
  7. <!-- Source configuration -->
  8. </source>
  9. <layout>
  10. <!-- Memory layout configuration -->
  11. </layout>
  12. <lifetime>
  13. <!-- Lifetime of dictionary in memory -->
  14. </lifetime>
  15. </dictionary>

相应的 DDL-查询 具有以下结构:

  1. CREATE DICTIONARY dict_name
  2. (
  3. ... -- attributes
  4. )
  5. PRIMARY KEY ... -- complex or single key configuration
  6. SOURCE(...) -- Source configuration
  7. LAYOUT(...) -- Memory layout configuration
  8. LIFETIME(...) -- Lifetime of dictionary in memory
  • name – The identifier that can be used to access the dictionary. Use the characters [a-zA-Z0-9_\-].
  • 来源 — Source of the dictionary.
  • 布局 — Dictionary layout in memory.
  • 结构 — Structure of the dictionary . A key and attributes that can be retrieved by this key.
  • 使用寿命 — Frequency of dictionary updates.

原始文章