The Lakehouse runtime catalog lets you create namespaces in borderless Lakehouse catalog endpoints to group and organize related tables.
When you create a namespace, you can optionally associate it with a custom Cloud Storage bucket or path, or inherit the catalog's default storage location.
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, if it is not already enabled.
Roles required to enable APIs
To enable APIs, you need the serviceusage.services.enable permission. If you
created the project, then you likely already have this permission through the
Owner role (roles/owner). Otherwise, you can get this permission through the
Service Usage Admin role (roles/serviceusage.serviceUsageAdmin).
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, if it is not already enabled.
Roles required to enable APIs
To enable APIs, you need the serviceusage.services.enable permission. If you
created the project, then you likely already have this permission through the
Owner role (roles/owner). Otherwise, you can get this permission through the
Service Usage Admin role (roles/serviceusage.serviceUsageAdmin).
Learn how to grant roles.
Required roles
To get the permissions that you need to create 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.
Create a namespace
Create a namespace within a catalog.
Considerations
When you create a namespace, you can optionally specify a Cloud Storage bucket or path to associate with the namespace:
- Multiple-bucket catalog (recommended): you can set any custom
location as long as it is in a location that the catalog permits
(
default_locationorrestricted_locations). If you don't specify a location, then the namespace is created in the catalog's default location (for example,gs://{default_location}/{namespace_name}). Single-bucket catalog: the namespace location is automatically inherited from the catalog's single bucket.
Console
In the Google Cloud console, go to the Lakehouse page.
Select an existing catalog, or create a catalog if you don't have one.
On the Catalog details page that opens, click Create namespace.
In the Namespace details section, configure the following settings:
- In the Namespace name field, enter a unique name for your namespace.
- Optional: In the Location field, enter or browse for a Cloud Storage bucket or path to associate with your namespace. By default, this field is populated with a path under the catalog's default location. For a multiple-bucket catalog, the location must be under a warehouse location allowed by the catalog. For a single-bucket catalog, the location is automatically inherited from the catalog's bucket.
- Optional: In the Owner field, enter or update the namespace owner. By default, this field is populated with your username.
Optional: To add custom metadata properties to the namespace, in the Properties section, click Add property. In the Key and Value fields, enter a key and value.
Click Create. Your namespace is created and appears in the Namespaces table on the Catalog details page.
gcloud
Create a namespace in a multiple-bucket catalog (recommended)
To create a namespace in a multiple-bucket catalog
(where you can optionally specify a custom location), run the
gcloud biglake iceberg namespaces create command with
the --properties flag:
gcloud biglake iceberg namespaces create NAMESPACE_NAME \ --project="PROJECT_ID" \ --catalog="CATALOG_ID" \ [--properties="location=LOCATION"]
Replace the following:
NAMESPACE_NAME: a name for your namespace.PROJECT_ID: your Google Cloud project ID.CATALOG_ID: the ID of your catalog.LOCATION: (Optional) a custom Cloud Storage bucket or path to associate with the namespace (for example,gs://my-bucket/my-path).
Create a namespace in a single-bucket catalog
To create a namespace in a single-bucket catalog, omit the --properties flag.
The namespace location is automatically inherited from the catalog's single bucket.
gcloud biglake iceberg namespaces create NAMESPACE_NAME \ --project="PROJECT_ID" \ --catalog="CATALOG_ID"
REST
To create a namespace by using the REST API, send a POST request to the
CreateIcebergNamespace endpoint:
POST /iceberg/v1/restcatalog/v1/projects/PROJECT_ID/catalogs/CATALOG_ID/namespaces
The request body must contain an Iceberg CreateNamespaceRequest JSON payload that defines the namespace identifier and properties:
{
"namespace": [
"NAMESPACE_NAME"
],
"properties": {
"location": "LOCATION"
}
}
Replace the following:
PROJECT_ID: your Google Cloud project ID.CATALOG_ID: the ID of your catalog.NAMESPACE_NAME: a name for your namespace.LOCATION: (Optional) a custom Cloud Storage bucket or path to associate with the namespace (for example,gs://my-bucket/my-path).
What's next
- Learn how to manage namespace ACLs.