Closed
Description
Use case
The content directory (data & metadata) corresponding to an Iceberg table exist on the object storage, but the table has been removed from the metastore.
Offer a way to recreate the table.
Existing workaround:
- create the table in Hive as an external table and point the
external_location
to thedata
directory of the table (I'm not sure if this plays well with Iceberg delete files ) - execute a CTAS statement to create a new Iceberg table
The outcome of the workaround is that all the existing content of the table has been copied to the newly created Iceberg table and also that the new Iceberg table lacks any history information.
Request
Provide a way to create an Iceberg table in Trino from existing content.
Feedback from @electrum:
Maybe need an explicit external flag (to point out in the
CREATE TABLE
statement that we're creating the table out of existing content).
Activity