מחיקת מרחב שמות

הקטלוג הייעודי לזמן ריצה של Lakehouse מאפשר למחוק מרחבי שמות מנקודות קצה של קטלוגים כדי לבטל את הרישום של מרחב השמות ב-Lakehouse ללא גבולות.

מחיקה של מרחב שמות מסירה אותו מ-Lakehouse, אבל היא לא מוחקת באופן אוטומטי את קטגוריית Cloud Storage הבסיסית או את קובצי הנתונים המאוחסנים. אי אפשר למחוק מרחב שמות שמכיל עדיין טבלאות.

לפני שמתחילים

  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. נכנסים לדף Lakehouse במסוף Google Cloud .

    מעבר אל Lakehouse

  2. בוחרים את הקטלוג שמכיל את מרחב השמות שרוצים למחוק.

  3. בשורה של מרחב השמות שרוצים למחוק, לוחצים על סמל האפשרויות הנוספות של מרחב השמות > מחיקה.

  4. בתיבת הדו-שיח למחיקה, מזינים 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: השם של מרחב השמות של הקטלוג.