获取目录端点详情

借助 Lakehouse 运行时目录,您可以检查无边界 Lakehouse 中目录端点的配置和元数据。对于 Apache Iceberg REST 目录端点,您可以检索客户端连接所需的 REST 目录 URI、身份验证方法和关联的服务账号。如需详细了解目录端点,请参阅目录类型和端点配置。

准备工作

  1. 请参阅 Lakehouse 运行时目录简介,了解 Lakehouse 运行时目录的工作原理以及该服务的限制。
  2. 登录您的 Google Cloud 账号。如果您是 Google Cloud新手,请创建一个账号来评估我们的产品在实际场景中的表现。新客户还可获享 $300 赠金,用于运行、测试和部署工作负载。

    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

    • 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 the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

    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.

    Enable the API

    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

    • 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 the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

    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.

    Enable the API

所需的角色

如需获得查看目录端点详情所需的权限,请让管理员为您授予项目的以下 IAM 角色:

如需详细了解如何授予角色,请参阅管理对项目、文件夹和组织的访问权限。

您也可以通过自定义角色或其他预定义角色来获取所需的权限。

获取目录端点详情

检查目录端点配置和属性。

控制台

  1. 在 Google Cloud 控制台中,打开 Lakehouse 页面。

    前往 Lakehouse

  2. 点击任意目录的名称。

  3. 在目录详情页面上,浏览有关目录的信息,例如目录 ID、创建时间戳、REST 目录 URI、身份验证方法和服务账号。

    对于联合目录,目录详情页面还会在配置后显示以下属性:

    • 身份模式:显示 Databricks Unity Catalog 连接的 Service identity 或 User identity federation。
    • 服务目录名称:显示为 AWS Glue、Snowflake Horizon Catalog 和 Databricks Unity Catalog 连接上的专用查询传输配置的 Service Directory 服务资源名称。
    • 元数据 Service Directory 名称:显示为 AWS Glue、Snowflake Horizon Catalog 和 Databricks Unity Catalog 连接上的专用后台元数据刷新配置的 Service Directory 服务资源名称。

gcloud

如需使用 Google Cloud CLI 描述目录端点,请运行 gcloud biglake iceberg catalogs describe 命令。

gcloud biglake iceberg catalogs describe CATALOG_ID \
    --project="PROJECT_ID"

替换以下内容:

  • CATALOG_ID:您的目录的 ID。
  • PROJECT_ID:您的 Google Cloud 项目 ID。

REST

如需使用 REST API 检索目录端点详细信息和配置,请向 GetIcebergCatalog 端点发出 GET 请求:

GET /iceberg/v1/restcatalog/extensions/projects/PROJECT_ID/catalogs/CATALOG_ID

响应包含一个描述目录配置的 IcebergCatalog JSON 对象。

替换以下内容:

  • PROJECT_ID:您的 Google Cloud 项目 ID。
  • CATALOG_ID:您的目录的 ID。