ALTER ICEBERG NAMESPACE

Alters the properties of an existing Iceberg namespace.

Iceberg namespaces are supported only in Eon Mode.

An Iceberg namespace represents the integration point between Vertica and an external Apache Iceberg catalog. The ALTER ICEBERG NAMESPACE statement allows you to to update the catalog configuration or storage location associated with a namespace without recreating the namespace. Only namespace‑level properties can be altered. Iceberg databases and tables remain managed by the external catalog and are resolved dynamically at query time.

Syntax

ALTER ICEBERG NAMESPACE namespace_name SET [CATALOG=catalog_name];

ALTER ICEBERG NAMESPACE namespace_name SET [LOCATION=path];

Parameters

Parameter Description
namespace_name The name of the existing Iceberg namespace to modify.
CATALOG The name of the Iceberg metadata catalog. The supported catalog types are filesystem, glue, hive, and rest.
LOCATION Path to the Iceberg warehouse that contains Iceberg metadata and data subdirectories.
rest_auth The authentication method for the REST catalog which supports either bearerToken or OAuth2 authentication. Applicable only when CATALOG is rest. For more information about rest_auth, see CREATE EXTERNAL TABLE ICEBERG.

Privileges

  • Only superusers can alter Iceberg namespaces.
  • Non‑superusers can query Iceberg data if they have appropriate access to the underlying storage.

Notes

  • Only one property can be altered per statement.
  • The namespace must already exist.
  • Changing a namespace configuration affects all queries that reference the namespace.
  • The Iceberg catalog and storage location must be valid and accessible.
  • Altering a namespace does not modify data in external storage.

Examples

Change the storage location for the "iceberg_fs" namespace.

=> ALTER ICEBERG NAMESPACE iceberg_fs SET LOCATION='/iceberg/finance/financedb';

Change the catalog type of iceberg_namespace_finance namespace with Hive metastore.

=> ALTER ICEBERG NAMESPACE iceberg_namespace_finance SET CATALOG='hive';

Create an Iceberg namespace named "sales_namespace_rest" with REST catalog, then verify the catalog configuration, and alter the namespace to update the endpoint.

Create the namespace with REST catalog.

=> CREATE ICEBERG NAMESPACE sales_namespace_rest
   WITH 
    CATALOG = 'rest',
    LOCATION = 'http://10.10.20.172:19120/iceberg/v1/main',
    REST_AUTH = '{"bearerToken": "eyJhbGciOiJSUzI5NiIsInR5cCIgOiBiSldUIiwia2llIiA6ICIzWFRweHB"}';

Verify namespace creation and catalog configuration.

=> SELECT * FROM v_catalog.iceberg_namespaces;

namespace_id      |  namespace_name      | catalog |                 location                  |                 rest_auth
-------------------+-------------------+---------+------------------------------------------+--------------------------------------------------------------
45035996273855050 | sales_namespace_rest | REST    | http://10.10.20.172:19120/iceberg/v1/main | {"bearerToken": "eyJhbGciOiJSUzI5NiIsInR5cCIgOiBiSldUIiwia2llIiA6ICIzWFRweHB"}
(1 row)

Query Data from an Iceberg Table

=> SELECT COUNT(*) FROM sales_namespace_rest.sales_rest_db.sales_table;
COUNT
-------     
  9
(1 row)

Modify namespace configuration: Update the REST endpoint for the namespace.

=> ALTER ICEBERG NAMESPACE sales_namespace_rest SET LOCATION='http://10.10.20.161:19120/iceberg/v1/main';

Validate after reconfiguration

=> SELECT COUNT(*) FROM sales_namespace_rest.sales_rest_db.sales_table;
COUNT
-------     
  9
(1 row)