Listing views lets you see which Apache Iceberg views are registered in a namespace of the Lakehouse runtime catalog. The result contains only view identifiers; tables are excluded, and listing tables likewise excludes views.
Before you begin
-
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.enablepermission. 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. - Set up the Lakehouse runtime catalog with the Apache Iceberg REST catalog endpoint.
- Review the limitations of Iceberg views.
- Create a view.
Required roles
To get the permissions that you need to list views, ask your administrator to grant you the following IAM roles on your project:
-
List views:
BigLake Viewer (
roles/biglake.viewer) - your project
For more information about granting roles, see Manage access to projects, folders, and organizations.
These predefined roles contain the permissions required to list views. To see the exact permissions that are required, expand the Required permissions section:
Required permissions
The following permissions are required to list views:
-
List views:
biglake.views.liston the namespace
You might also be able to get these permissions with custom roles or other predefined roles.
For a complete list of view permissions, see Required roles and permissions.
List views
List the views in a namespace.
Spark
SHOW VIEWS IN NAMESPACE_NAME;
Replace NAMESPACE_NAME with the name of your
namespace.
REST
To list views using the REST API, make a GET request to the
ListIcebergViewIdentifiers endpoint:
GET /iceberg/v1/restcatalog/v1/projects/PROJECT_ID/catalogs/CATALOG_ID/namespaces/NAMESPACE_NAME/views
The endpoint supports the pageToken and pageSize query parameters.
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.
What's next
- Learn how to get view details.
- Learn how to query a view.