CREATE DICTIONARY

Creates a new external dictionary with given structure, source, layout and lifetime.

Syntax:

  1. CREATE DICTIONARY [IF NOT EXISTS] [db.]dictionary_name [ON CLUSTER cluster]
  2. (
  3. key1 type1 [DEFAULT|EXPRESSION expr1] [HIERARCHICAL|INJECTIVE|IS_OBJECT_ID],
  4. key2 type2 [DEFAULT|EXPRESSION expr2] [HIERARCHICAL|INJECTIVE|IS_OBJECT_ID],
  5. attr1 type2 [DEFAULT|EXPRESSION expr3],
  6. attr2 type2 [DEFAULT|EXPRESSION expr4]
  7. )
  8. PRIMARY KEY key1, key2
  9. SOURCE(SOURCE_NAME([param1 value1 ... paramN valueN]))
  10. LAYOUT(LAYOUT_NAME([param_name param_value]))
  11. LIFETIME({MIN min_val MAX max_val | max_val})

External dictionary structure consists of attributes. Dictionary attributes are specified similarly to table columns. The only required attribute property is its type, all other properties may have default values.

ON CLUSTER clause allows creating dictionary on a cluster, see Distributed DDL.

Depending on dictionary layout one or more attributes can be specified as dictionary keys.

For more information, see External Dictionaries section.