When you delete a catalog namespace (such as for an Apache Iceberg REST catalog or Apache Hive catalog), the system unregisters the namespace from the Lakehouse runtime catalog.
Although this removes the namespace from Lakehouse for Apache Iceberg, it does not automatically delete the underlying Cloud Storage bucket or your stored data files.
If a namespace does not contain any tables, you can delete it.
Before you begin
- Read About the Lakehouse runtime catalog to understand how the Lakehouse runtime catalog works and the limitations for the service.
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles. - Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
Verify that billing is enabled for your Google Cloud project.
Enable the BigLake API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM
role (roles/serviceusage.serviceUsageAdmin), which
contains the serviceusage.services.enable permission. Learn how to grant
roles.
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
Verify that billing is enabled for your Google Cloud project.
Enable the BigLake API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM
role (roles/serviceusage.serviceUsageAdmin), which
contains the serviceusage.services.enable permission. Learn how to grant
roles.
Required roles
To get the permissions that you need to delete a namespace, ask your administrator to grant you the following IAM roles on your project:
-
All:
- BigLake Admin (
roles/biglake.admin) - Storage Admin (
roles/storage.admin)
- BigLake Admin (
For more information about granting roles, see Manage access to projects, folders, and organizations.
You might also be able to get the required permissions through custom roles or other predefined roles.
Delete a namespace
Delete a namespace from a catalog.
Console
In the Google Cloud console, go to the Lakehouse page.
Select the catalog that contains the namespace to delete.
In the row of the namespace that you're deleting, click More namespace actions > Delete.
In the delete dialog, enter
DELETEand click Delete.
gcloud
To delete a namespace using gcloud, run the gcloud biglake iceberg namespaces delete command.
gcloud biglake iceberg namespaces delete NAMESPACE_NAME \ --project="PROJECT_ID" \ --catalog="CATALOG_ID"
Replace the following:
NAMESPACE_NAME: the name of your namespace.PROJECT_ID: your Google Cloud project ID.CATALOG_ID: the ID of your catalog.
REST
To delete a namespace using the REST API, make a DELETE request to the
DeleteIcebergNamespace endpoint:
DELETE /iceberg/v1/restcatalog/v1/projects/PROJECT_ID/catalogs/CATALOG_ID/namespaces/NAMESPACE_NAME
Replace the following:
PROJECT_ID: your Google Cloud project ID.CATALOG_ID: the ID of your catalog.NAMESPACE_NAME: the name of your catalog namespace.