primary key(id) NOT ENFORCED的含义
primary key(id) NOT ENFORCED 指 声明id为主键,但是不做强检验。
例如.
// 导入数据到iceberg table的sink表
create table if not exists student_normalization(
id INT NOT NULL,
name STRING,
test STRING,
score InT,
normalization_score DOUBLE NOT NULL,
PRIMARY KEY (id) NOT ENFORCED
)WITH(
'connector'='iceberg',
'catalog-type'='hadoop',
'catalog-name'-'hadoop_catalog',
'warehouse'='alluxio://xx.xx.xx.xx:19998/iceberg/warehouse/iceberg_db',
'property-version'='2',
'format-version'='2'
);