Dictionary Table Engine

    As an example, consider a dictionary of products with the following configuration:

    Query the dictionary data:

    1. SELECT
    2. name,
    3. type,
    4. key,
    5. attribute.types,
    6. bytes_allocated,
    7. element_count,
    8. source
    9. FROM system.dictionaries

    This view isn’t helpful when you need to get raw data, or when performing a JOIN operation. For these cases, you can use the Dictionary engine, which displays the dictionary data in a table.

    Syntax:

    1. CREATE TABLE %table_name% (%fields%) engine = Dictionary(%dictionary_name%)`
    1. Ok

    Take a look at what’s in the table.

    1. ┌────product_id─┬─title───────────┐
    2. └───────────────┴─────────────────┘

    See Also