Menghapus namespace

Saat Anda menghapus namespace katalog (seperti untuk katalog REST Apache Iceberg atau katalog Apache Hive), sistem akan membatalkan pendaftaran namespace dari katalog runtime Lakehouse.

Meskipun tindakan ini menghapus namespace dari Lakehouse untuk Apache Iceberg, tindakan ini tidak menghapus bucket Cloud Storage yang mendasarinya secara otomatis atau file data tersimpan Anda.

Jika namespace tidak berisi tabel apa pun, Anda dapat menghapusnya.

Sebelum memulai

  1. Baca Tentang katalog runtime Lakehouse untuk memahami cara kerja katalog runtime Lakehouse dan batasan untuk layanan ini.
  2. Login ke akun Google Cloud Anda. Jika Anda baru menggunakan Google Cloud, buat akun untuk mengevaluasi performa produk kami dalam skenario dunia nyata. Pelanggan baru juga mendapatkan kredit gratis senilai $300 untuk menjalankan, menguji, dan men-deploy workload.

    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 Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. 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 Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the API

Peran yang diperlukan

Untuk mendapatkan izin yang Anda perlukan untuk menghapus namespace, minta administrator untuk memberi Anda peran IAM berikut di project Anda:

Untuk mengetahui informasi selengkapnya tentang pemberian peran, lihat Mengelola akses ke project, folder, dan organisasi.

Anda mungkin juga bisa mendapatkan izin yang diperlukan melalui peran khusus atau peran bawaan lainnya.

Menghapus namespace

Menghapus namespace dari katalog.

Konsol

  1. Di konsol Google Cloud , buka halaman Lakehouse.

    Buka Lakehouse

  2. Pilih katalog yang berisi namespace yang akan dihapus.

  3. Di baris namespace yang Anda hapus, klik Tindakan namespace lainnya > Hapus.

  4. Dalam dialog hapus, masukkan DELETE, lalu klik Hapus.

gcloud

Untuk menghapus namespace menggunakan gcloud, jalankan perintah gcloud biglake iceberg namespaces delete.

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

Ganti kode berikut:

  • NAMESPACE_NAME: nama namespace Anda.
  • PROJECT_ID: Google Cloud Project ID Anda.
  • CATALOG_ID: ID katalog Anda.

REST

Untuk menghapus namespace menggunakan REST API, buat permintaan DELETE ke endpoint DeleteIcebergNamespace:

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

Ganti kode berikut:

  • PROJECT_ID: Google Cloud Project ID Anda.
  • CATALOG_ID: ID katalog Anda.
  • NAMESPACE_NAME: nama namespace katalog Anda.