Setting Key Columns

Set primary keys in the Visual editor within the Column compartment of the delta stream, window, and Flex operator shapes.

Multiple columns can be designated as primary keys. In the Visual editor, primary keys appear as column_key.gif icons. Deduced primary keys are displayed as column_key_deduced.gif icons. Deduced keys are calculated when the PRIMARY KEY DEDUCED flag is set for the target element.
Note: Only delta streams and windows support PRIMARY KEY DEDUCED. You can modify the deduced key property for these elements from the Properties view.
  1. Expand the Columns compartment of the desired query object (delta stream, window, or Flex shape).
  2. Click the icon to the left of the column name to make it a primary key.
    A single-key icon column_key.gif now designates the column as a primary key.
  3. To set a primary key for query objects with a deduced primary key, click any column or deduced key within the target stream or window.
    The column you initially selected and all other deduced key columns are now primary keys. In addition, the target stream or window is no longer PRIMARY KEY DEDUCED.
  4. To remove the primary key designation from a column, click column_key.gif to the left of the column name.
    A column icon replaces the single key icon, indicating that the column is no longer part of the primary key.