Using Apache IcebergPDF version

Changing the table metadata location

From Hive and Impala, you can change the table metadata location, also known as the snapshot location.

In this release, you can prevent overrides of the Iceberg file metadata location by unauthorized users. If you do not prevent overrides, an unauthorized party who knows the underlying schema and file location outside the table location can rewrite the manifest files within one table location to point to the data files in another table location to read your data. You accept the default (true), or set a property in the Virtual Warehouse to true to prevent overrides:
  • Hive property: hive.iceberg.allow.datafiles.in.table.location.only
    SET hive.iceberg.allow.datafiles.in.table.location.only = true;
  • Impala property: iceberg_restrict_data_file_location
    SET iceberg_restrict_data_file_location = true;
  • The new location must contain exactly the same metadata json file as the old location.

  • Before changing the metadata location, you must migrate the table to Iceberg.

After migrating a table to Iceberg, you can change the metadata location using ALTER TABLE as shown below:

ALTER TABLE test_table SET TBLPROPERTIES('metadata_location'='s3a://bucketName/ice_table/metadata/v1.metadata.json');

We want your opinion

How can we improve this page?

What kind of feedback do you have?