Skip to content

Add support for creating an Iceberg table from existing table content #13552

Closed
@findinpath

Description

@findinpath

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 the data 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions