カタログの更新

カタログ(Apache Iceberg REST カタログなど)を更新すると、認証情報モード、デフォルトのウェアハウスの場所、基盤となるカタログ タイプなどのプロパティを変更できます。

たとえば、単一バケット(gs://)カタログ複数バケット(bl://)カタログ(推奨)にアップグレードできます。カタログをアップグレードすると、カタログを複数のストレージ バケットにまたがって使用できるようになるなど、大きなメリットがあります。

始める前に

  1. Lakehouse ランタイム カタログについてを読んで、Lakehouse ランタイム カタログの仕組みとサービスの制限事項を確認します。
  2. Google Cloud アカウントにログインします。 Google Cloudを初めて使用する場合は、 アカウントを作成して、実際のシナリオでの Google プロダクトのパフォーマンスを評価してください。新規のお客様には、ワークロードの実行、テスト、デプロイができる無料クレジット $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.

    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.

    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 ロールを付与するよう管理者に依頼してください。

ロールの付与については、プロジェクト、フォルダ、組織へのアクセス権の管理をご覧ください。

必要な権限は、カスタムロールや他の事前定義ロールから取得することもできます。

カタログの更新

カタログを更新するには、 Google Cloud コンソール、gcloud、または REST API を使用します。

コンソール

  1. Google Cloud コンソールで、[Lakehouse] ページを開きます。

    [レイクハウス] に移動

  2. 更新するカタログの行で、 [その他のカタログ操作] > [編集] をクリックします。

  3. [カタログ構成] で、更新する設定を変更します。

  4. [保存] を選択します。

gcloud

オプション 1: カタログのプロパティを更新する

カタログのプロパティ(説明や制限付きのロケーションなど)を更新するには、gcloud beta biglake iceberg catalogs update コマンドを実行します。

gcloud beta biglake iceberg catalogs update CATALOG_ID \
    --project="PROJECT_ID" \
    [--description="DESCRIPTION"] \
    [--credential-mode="CREDENTIAL_MODE"] \
    [--restricted-locations="RESTRICTED_LOCATIONS"]

次のように置き換えます。

  • CATALOG_ID: Lakehouse ランタイム カタログの ID。
  • PROJECT_ID: 実際の Google Cloud プロジェクト ID。
  • DESCRIPTION: (省略可)カタログの説明。
  • CREDENTIAL_MODE: (省略可)認証方法。エンドユーザー認証情報には end-user を使用し、認証情報ベンディング モードには vended-credentials を使用します。
  • RESTRICTED_LOCATIONS: (省略可)許可されている追加のストレージ バケットまたはパスのカンマ区切りのリスト。注意: 重複するパスまたはバケットを複数指定すると、メタデータの競合、データの誤った上書き、権限漏洩などのセキュリティ上の問題が発生する可能性があります。

オプション 2: 単一バケット(gs://)カタログを複数バケット(bl://)カタログにアップグレードする(推奨)

既存の単一バケット(gs://)カタログを複数バケット(bl://)カタログにアップグレードするには(推奨)、gcloud beta biglake iceberg catalogs update コマンドを実行し、--catalog-type パラメータを biglake に設定します。

gcloud beta biglake iceberg catalogs update CATALOG_ID \
    --project="PROJECT_ID" \
    --catalog-type="biglake"

REST

オプション 1: カタログのプロパティを更新する

REST API を使用してカタログのプロパティ(説明など)を変更するには、適切な updateMask を使用して UpdateIcebergCatalog エンドポイントに PATCH リクエストを行います。

PATCH /iceberg/v1/restcatalog/extensions/projects/PROJECT_ID/catalogs/CATALOG_ID?updateMask=icebergCatalog.description

リクエストの本文には、更新するフィールドを含む IcebergCatalog JSON ペイロードを含める必要があります。

{
  "description": "Updated catalog description"
}

オプション 2: 単一バケット(gs://)カタログを複数バケット(bl://)カタログにアップグレードする(推奨)

REST API を使用してタイプをアップグレードするには、updateMaskcatalogType を使用して UpdateIcebergCatalog エンドポイントに PATCH リクエストを行います。

PATCH /iceberg/v1/restcatalog/extensions/projects/PROJECT_ID/catalogs/CATALOG_ID?updateMask=icebergCatalog.catalogType

リクエストの本文には、新しいカタログ タイプを含む IcebergCatalog JSON ペイロードを含める必要があります。

{
  "catalogType": "BIGLAKE"
}

次のように置き換えます。

  • PROJECT_ID: 実際の Google Cloud プロジェクト ID。
  • CATALOG_ID: Lakehouse ランタイム カタログの ID。