קבלת פרטי קטלוג

אחזור של מאפייני הגדרה חושף מטא-נתונים של Lakehouse for Apache Iceberg.

בקטלוג זמן הריצה של Lakehouse, בדיקה של קטלוג קיים (כמו קטלוג Apache Iceberg REST או קטלוג Apache Hive) חושפת את הפרטים שלו. בקטלוגים של Apache Iceberg REST, זה כולל את ה-URI של קטלוג REST שנדרש לחיבורי לקוח, שיטת האימות וחשבון השירות המשויך.

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

  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.

    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 הבאים בפרויקט:

להסבר על מתן תפקידים, ראו איך מנהלים את הגישה ברמת הפרויקט, התיקייה והארגון.

יכול להיות שאפשר לקבל את ההרשאות הנדרשות גם באמצעות תפקידים בהתאמה אישית או תפקידים מוגדרים מראש.

קבלת פרטי קטלוג

בודקים את ההגדרות והמאפיינים של הקטלוג.

המסוף

  1. במסוף Google Cloud , פותחים את הדף Lakehouse.

    מעבר אל Lakehouse

  2. לוחצים על השם של קטלוג כלשהו.

  3. בדף פרטי הקטלוג, אפשר לעיין במידע על הקטלוג, כמו מזהה הקטלוג, חותמת הזמן של היצירה, URI של קטלוג REST, שיטת האימות וחשבון השירות.

gcloud

כדי לתאר קטלוג באמצעות gcloud, מריצים את הפקודה gcloud biglake iceberg catalogs describe.

gcloud biglake iceberg catalogs describe CATALOG_ID \
    --project="PROJECT_ID"

מחליפים את מה שכתוב בשדות הבאים:

  • CATALOG_ID: המזהה של הקטלוג.
  • PROJECT_ID: מזהה הפרויקט ב- Google Cloud .

REST

כדי לאחזר פרטים והגדרות של קטלוג באמצעות API בארכיטקטורת REST, שולחים בקשת GET לנקודת הקצה GetIcebergCatalog:

GET /iceberg/v1/restcatalog/extensions/projects/PROJECT_ID/catalogs/CATALOG_ID

התגובה מכילה אובייקט JSON IcebergCatalog שמתאר את הגדרות הקטלוג.

מחליפים את מה שכתוב בשדות הבאים:

  • PROJECT_ID: מזהה הפרויקט ב- Google Cloud .
  • CATALOG_ID: המזהה של הקטלוג.