Namespace を削除する

Lakehouse ランタイム カタログを使用すると、カタログ エンドポイントから Namespace を削除して、ボーダーレス Lakehouse で Namespace の登録を解除できます。

名前空間を削除すると、Lakehouse から削除されますが、基盤となる Cloud Storage バケットや保存されたデータファイルは自動的に削除されません。テーブルがまだ含まれている名前空間は削除できません。

始める前に

  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, 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

必要なロール

Namespace を削除するために必要な権限を取得するには、プロジェクトに対する次の IAM ロールを付与するよう管理者に依頼してください。

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

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

Namespace を削除する

カタログから Namespace を削除します。

コンソール

  1. Google Cloud コンソールで、[Lakehouse] ページに移動します。

    [レイクハウス] に移動

  2. 削除する名前空間を含むカタログを選択します。

  3. 削除する Namespace の行で、 [その他の Namespace アクション] > [削除] をクリックします。

  4. 削除ダイアログで「DELETE」と入力し、[削除] をクリックします。

gcloud

gcloud を使用して Namespace を削除するには、gcloud biglake iceberg namespaces delete コマンドを実行します。

gcloud biglake iceberg namespaces delete NAMESPACE_NAME \
    --project="PROJECT_ID" \
    --catalog="CATALOG_ID"

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

  • NAMESPACE_NAME: 名前空間の名前。
  • PROJECT_ID: 実際の Google Cloud プロジェクト ID。
  • CATALOG_ID: カタログの ID。

REST

REST API を使用して Namespace を削除するには、DeleteIcebergNamespace エンドポイントに DELETE リクエストを行います。

DELETE /iceberg/v1/restcatalog/v1/projects/PROJECT_ID/catalogs/CATALOG_ID/namespaces/NAMESPACE_NAME

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

  • PROJECT_ID: 実際の Google Cloud プロジェクト ID。
  • CATALOG_ID: カタログの ID。
  • NAMESPACE_NAME: カタログ Namespace の名前。