Ctrl+K
Logo image Logo image

Site Navigation

  • API Reference
  • Examples

Site Navigation

  • API Reference
  • Examples

Section Navigation

  • PyFlink Table
    • TableEnvironment
    • Table
    • Data Types
    • Window
    • Expressions
    • User Defined Functions
    • Descriptors
    • StatementSet
    • Catalog
  • PyFlink DataStream
  • PyFlink Common

pyflink.table.schema.Schema.Builder.primary_key#

Builder.primary_key(*column_names: str) → 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

previous

pyflink.table.schema.Schema.Builder.watermark

next

pyflink.table.schema.Schema.Builder.primary_key_named

On this page
  • Builder.primary_key()
Show Source

Created using Sphinx 5.3.0.