Auto-increment Column IDENTITY
Lakehouse supports identifying columns when creating tables, defining fields as auto-increment fields.
Configure the auto-increment sequence. The following table creation uses auto-increment
Syntax
- seed: The value to be loaded into the first row of the table. If not specified, the default starting value is 0
Behavior Description
- It cannot be guaranteed that the values in the sequence are continuous (gapless), nor can it be guaranteed that the sequence values are allocated in a specific order. This is because other concurrent inserts may occur in the table. These limitations are part of the design to improve performance, as they are acceptable in many common scenarios.
Example
Limitations and Constraints
- Currently does not support writing through the Ingest Service streaming interface, only supports identity column writing at the SQL syntax level
- Does not support specifying step size, the default step size is 1
- Does not support adding auto-increment to existing tables through alter
- Does not support setting auto-increment for external tables, dynamic tables, and materialized views