Slide 16
Slide 16 text
DDL
spark-sqlで実⾏する。
CREATE TABLE IF NOT EXISTS glue.testdb_production.test_tables (
app_id bigint NOT NULL,
user_id bigint NOT NULL,
key string NOT NULL,
value string
)
USING iceberg
PARTITIONED BY (bucket(32, app_id), bucket(8, key))
TBLPROPERTIES (
'write.object-storage.enabled'='true',
'write.delete.mode'='merge-on-read',
'write.update.mode'='merge-on-read',
'write.merge.mode'='merge-on-read',
'history.expire.max-snapshot-age-ms'='86400000'
)
LOCATION 's3://repro-experimental-store/production/testdb_production/test_tables';
ALTER TABLE glue.testdb_production.test_tables WRITE ORDERED BY insight_id, key;
ALTER TABLE glue.testdb_production.test_tables SET IDENTIFIER FIELDS insight_id, user_id, key; 16