כשמוחקים מרחב שמות של קטלוג (למשל, של קטלוג Apache Iceberg REST או של קטלוג Apache Hive), המערכת מבטלת את הרישום של מרחב השמות מקטלוג זמן הריצה של Lakehouse.
הפעולה הזו מסירה את מרחב השמות מ-Lakehouse for Apache Iceberg, אבל היא לא מוחקת באופן אוטומטי את קטגוריה של Cloud Storage הבסיסית או את קובצי הנתונים המאוחסנים.
אם מרחב שמות לא מכיל טבלאות, אפשר למחוק אותו.
לפני שמתחילים
- כדאי לקרוא את המאמר מידע על קטלוג זמן הריצה של Lakehouse כדי להבין איך קטלוג זמן הריצה של Lakehouse פועל ומהן המגבלות של השירות.
- 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 theresourcemanager.projects.createpermission. Learn how to grant roles. - 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 theresourcemanager.projects.createpermission. Learn how to grant roles.
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
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.
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
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.
התפקידים הנדרשים
כדי לקבל את ההרשאות שדרושות למחיקת מרחב שמות, צריך לבקש מהאדמין להקצות לכם את תפקידי ה-IAM הבאים בפרויקט:
-
הכול:
- אדמין ב-BigLake (
roles/biglake.admin) - אדמין באחסון (
roles/storage.admin)
- אדמין ב-BigLake (
להסבר על מתן תפקידים, ראו איך מנהלים את הגישה ברמת הפרויקט, התיקייה והארגון.
יכול להיות שאפשר לקבל את ההרשאות הנדרשות גם באמצעות תפקידים בהתאמה אישית או תפקידים מוגדרים מראש.
מחיקת מרחב שמות
מחיקת מרחב שמות מקטלוג.
המסוף
נכנסים לדף Lakehouse במסוף Google Cloud .
בוחרים את הקטלוג שמכיל את מרחב השמות שרוצים למחוק.
בשורה של מרחב השמות שרוצים למחוק, לוחצים על פעולות נוספות במרחב השמות > מחיקה.
בתיבת הדו-שיח למחיקה, מזינים
DELETEולוחצים על מחיקה.
gcloud
כדי למחוק מרחב שמות באמצעות gcloud, מריצים את הפקודה gcloud biglake iceberg namespaces delete.
gcloud biglake iceberg namespaces delete NAMESPACE_NAME \ --project="PROJECT_ID" \ --catalog="CATALOG_ID"
מחליפים את מה שכתוב בשדות הבאים:
-
NAMESPACE_NAME: השם של מרחב השמות. -
PROJECT_ID: מזהה הפרויקט ב- Google Cloud . -
CATALOG_ID: המזהה של הקטלוג.
REST
כדי למחוק מרחב שמות באמצעות API בארכיטקטורת REST, שולחים בקשת DELETE לנקודת הקצה DeleteIcebergNamespace:
DELETE /iceberg/v1/restcatalog/v1/projects/PROJECT_ID/catalogs/CATALOG_ID/namespaces/NAMESPACE_NAME
מחליפים את מה שכתוב בשדות הבאים:
-
PROJECT_ID: מזהה הפרויקט ב- Google Cloud . -
CATALOG_ID: המזהה של הקטלוג. -
NAMESPACE_NAME: השם של מרחב השמות של הקטלוג.