Skip to main content

Question

How to create a ClickHouse dictionary using string keys and string values from a MergeTree table source

Answer

  • Create the source table for the dictionary
  • Insert rows
  • Create dictionary with key/value both as String
  • Test the dictionary
You can also use dictGet function to retrieve values from it such as:
Response:
More details - https://clickhouse.com/docs/sql-reference/functions/ext-dict-functions
Last modified on July 2, 2026