Back to Clickhouse

Null dictionary source

docs/en/sql-reference/statements/create/dictionary/sources/null.md

26.4.1.1-new431 B
Original Source

A special source that can be used to create dummy (empty) dictionaries. Dummy dictionaries can be useful for testing purposes or for setups with separate data and query nodes with distributed tables.

sql
CREATE DICTIONARY null_dict (
    id              UInt64,
    val             UInt8,
    default_val     UInt8 DEFAULT 123,
    nullable_val    Nullable(UInt8)
)
PRIMARY KEY id
SOURCE(NULL())
LAYOUT(FLAT())
LIFETIME(0);