Creating Iceberg tables in watsonx.data
After a watsonx.data metastore has been registered in Db2, it is possible to create Iceberg tables directly in watsonx.data from Db2. The table is then accessible from both systems.
To create an Iceberg table in the watsonx.data catalog from Db2, add the "iceberg.catalog" property to the standard CREATE Datalake TABLE statement, giving it the name used to register the watsonx.data metastore. The table will exist in both Db2 and watsonx.data.
There must be a schema in watsonx.data with the same name as the schema in which the table is created in Db2.
It is possible to SELECT from and INSERT to this table from Db2, subject to SQL access. It is not possible to modify or ALTER the table. If the table schema is modified in watsonx.data, the table can be updated in Db2 by running the import procedure for the table.
Examples
'watsonxdata'
and is also accessible from
Db2:CREATE DATALAKE TABLE iceberg.db2exported(id int, name varchar(32)) STORED AS PARQUET STORED BY ICEBERG LOCATION 'DB2REMOTE://iceberg-bucket//iceberg/db2exported' TBLPROPERTIES('iceberg.catalog' = 'watsonxdata')