pyflink.table.schema.Schema.Builder.primary_key#
- Builder.primary_key(*column_names: str) pyflink.table.schema.Schema.Builder #
Declares a primary key constraint for a set of given columns. Primary key uniquely identify a row in a table. Neither of columns in a primary can be nullable. The primary key is informational only. It will not be enforced. It can be used for optimizations. It is the data owner’s responsibility to ensure uniqueness of the data.
The primary key will be assigned a generated name in the format {@code PK_col1_col2}.
- Parameters
column_names – Columns that form a unique primary key