ניהול מילון המונחים הארגוני

מילוני המונחים הארגוניים ב-Knowledge Catalog (לשעבר Dataplex Universal Catalog) מאפשרים לכם ליצור אוצר מילים סטנדרטי לנכסי הנתונים בארגון. אתם יכולים ליצור ולנהל קטגוריות ומונחים כדי לצמצם את חוסר הבהירות ולשפר את הגילוי והפיקוח על הנתונים. אם זו הפעם הראשונה שאתם יוצרים מילון מונחים ארגוני, קראו את המדריך למתחילים בנושא יצירה ושימוש במילון מונחים ארגוני.

תרחישי שימוש במילון המונחים הארגוני של Knowledge Catalog

כשיוצרים שפה משותפת לנתונים באמצעות מילון המונחים הארגוני של Knowledge Catalog, אפשר:

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

מילון המונחים הארגוני של Knowledge Catalog עוזר לייעל את גילוי הנתונים ולצמצם את חוסר הבהירות, וכך לשפר את הפיקוח, לדייק את הניתוח ולהפיק תובנות מהר יותר.

רכיבים של מילון המונחים הארגוני

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

מילון מונחים

למילון מונחים יש את המאפיינים הבאים:

  • סקירה כללית. מתאר את המטרה והתוכן של מילון המונחים הארגוני. אתם יכולים להוסיף תמונות, קישורים וטבלאות. אי אפשר להשתמש בעיצוב HTML, אבל אתם יכולים לכלול קוד HTML שמעוצב כקוד או להוסיף קישור לדף HTML. אתם יכולים גם להשתמש באפשרויות עיצוב של Rich Text, כמו טקסט מודגש, נטוי, עם קו תחתון, רשימות עם תבליטים, פסקאות, כותרות ובלוקים של קוד. הגודל המקסימלי שנתמך הוא 120KB.

  • תיאור. תיאור של מילון המונחים. הטקסט בשדה הזה נוסף לאינדקס לצורך חיפוש. הגודל המקסימלי שנתמך הוא 1KB.

  • אזור. מציין את האזור שבו נמצא מילון המונחים.

קטגוריה

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

לקטגוריה יש את המאפיינים של מילון מונחים, וגם את המאפיינים הבאים:

  • אנשי קשר. מציין את האדם שאחראי על תחזוקת הקטגוריה. המאפיין הזה הוא תיאורי ולא משפיע על ההרשאות של הקטגוריה.
  • הורה. מציין קשר שמשמש להגדרת הקטגוריה הראשית של הקטגוריה הנוכחית. אפשר להוסיף עד שלוש קטגוריות משנה.

האזור של הקטגוריה זהה לאזור של מילון המונחים שמכיל אותה.

מונח

מונח (קיצור של "מונח במילון המונחים") מתאר מושג שמשמש בתחום עסקי מסוים בחברה. לדוגמה, מחלקת השיווק של חברה יכולה ליצור מונח שמתאר עלות לקליק. המונחים מוגדרים במילון המונחים הארגוני, ישירות במילון או בכל קטגוריה שנמצאת במילון.

למונח יש את המאפיינים של קטגוריה, וגם את המאפיינים הבאים:

  • מילים נרדפות. מציין קישורים בין מונחים שיש להם משמעות זהה. לעיון במונחים נרדפים
  • מונחים קשורים. מציין קישורים בין מונחים שקשורים זה לזה מבחינה רעיונית, אבל יש להם משמעויות שונות. מונחים קשורים
  • ערכים קשורים. מציין קישורים בין מונחים לנכסי נתונים, או בין מונחים לעמודות בתוך נכסי נתונים.
  • כללים לאיכות הנתונים. מציין את דרישות איכות הנתונים של המונח. מידע נוסף זמין במאמר שימוש חוזר בכללים לאיכות הנתונים.
  • אנשי קשר. מציין את האדם שאחראי על תחזוקת המונח. המונחים לא יורשים את אנשי הקשר שמוגדרים בקטגוריות.

האזור של המונח זהה לאזור של מילון המונחים שמכיל אותו.

מילים נרדפות

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

מונח קשור הוא קשר שמציין ששני מונחים משויכים זה לזה, אבל יש להם משמעויות שונות. לדוגמה, אתם יכולים ליצור מונח קשור כדי לקשר בין המונחים "הכנסה" ו "רווח".

מגבלות

  • מילוני המונחים הארגוניים נמצאים בתוך פרויקטים ומיקומים, והמגבלות על פרויקטים ומיקומים חלות על מילוני המונחים.
  • כשמשתמשים במילון המונחים הארגוני עם סוכן נתונים של BigQuery, סוכן הנתונים יכול לייבא עד 10 מונחים ממילון המונחים לכל טבלה. אם תצרפו יותר מ-10 מונחים לטבלה, סוכן הנתונים יתעלם מהמונחים הנוספים. כדי שסוכן הנתונים יפעל בצורה אופטימלית, חשוב גם לספק תיאורים מקיפים ברמת הטבלה וברמת העמודה בטבלאות.

התפקידים הנדרשים

כדי לקבל את ההרשאות שדרושות ליצירה ולניהול של מילוני מונחים, בקשו מהאדמין להקצות לכם את התפקידים הבאים ב-IAM בפרויקט:

  • לאדמינים של נתונים, כדי לקבל גישה מלאה למילוני מונחים, קטגוריות, מונחים, מילים נרדפות ומונחים קשורים, ולהגדיר מדיניות IAM: אדמין של Dataplex Catalog (roles/dataplex.catalogAdmin)
  • למנהלי מידע ארגוני או לבעלי מידע, גישה ליצירה, לעריכה או למחיקה של מילוני מונחים, קטגוריות, מונחים, קישורים בין מונחים, קישורים בין מונחים לבין נכסי נתונים וחיפוש: עריכת קטלוג Dataplex (roles/dataplex.catalogEditor)
  • למנתחי נתונים או לצרכני נתונים, קבלת גישה לקריאה בלבד למילוני מונחים, לקטגוריות, למונחים, לקישורים בין מונחים ובין מונחים לנכסי נתונים, ולחיפוש: Dataplex Catalog Viewer (roles/dataplex.catalogViewer)

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

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

ההרשאות הנדרשות

כדי ליצור ולנהל מילון מונחים, צריך את ההרשאות הבאות:

  • ליצור, לקרוא, לעדכן ולמחוק מילון מונחים ארגוני, קטגוריה ומונחים בפרויקט:
    • dataplex.glossaries.list
    • dataplex.glossaries.create
    • dataplex.glossaries.get
    • dataplex.glossaries.update
    • dataplex.glossaries.delete
    • dataplex.glossaryCategories.create
    • dataplex.glossaryCategories.list
    • dataplex.glossaryCategories.get
    • dataplex.glossaryCategories.update
    • dataplex.glossaryCategories.delete
    • dataplex.glossaryTerms.create
    • dataplex.glossaryTerms.list
    • dataplex.glossaryTerms.get
    • dataplex.glossaryTerms.update
    • dataplex.glossaryTerms.delete
  • כדי ליצור, לחפש ולמחוק קישורים בין מונחים נרדפים בפרויקט:
    • ‫dataplex.entryLinks.create בקבוצת הרשומות של Knowledge Catalog בפרויקט שבו נמצא אחד מהמונחים במילון. הקישור נוצר בקבוצת הרשומות שניתנה לה ההרשאה.
    • ‫dataplex.entryGroups.useSynonymEntryLink בקבוצת הרשומות של Knowledge Catalog בפרויקט שבו נמצא אחד מהמונחים במילון. הקישור נוצר בקבוצת הרשומות שניתנה לה ההרשאה.
    • ‫dataplex.glossaryTerms.use במילוני המונחים שצריך לשייך את המונחים שלהם.
    • ‫dataplex.glossaryTerms.get במונח שאתם מחפשים את הקישורים למילים הנרדפות שלו. אם אין לכם את ההרשאה dataplex.glossaryTerms.get למונחים נרדפים, Knowledge Catalog מצנזר אותם בתשובה.
    • ‫dataplex.entryLinks.delete בקבוצת הרשומות של Knowledge Catalog בפרויקט שבו הקישור נמצא.
  • יצירה, חיפוש ומחיקה של קישורים בין מונחים קשורים בפרויקט:
    • ‫dataplex.entryLinks.create בקבוצת הרשומות של Knowledge Catalog בפרויקט שבו נמצא אחד מהמונחים במילון. הקישור נוצר בקבוצת הרשומות שניתנה לה ההרשאה.
    • ‫dataplex.entryGroups.useRelatedEntryLink בקבוצת הרשומות של Knowledge Catalog בפרויקט שבו נמצא אחד מהמונחים במילון. הקישור נוצר בקבוצת הרשומות שניתנה לה ההרשאה.
    • ‫dataplex.entries.link בקבוצת הרשומות של Knowledge Catalog בפרויקטים שבהם יש רשומות שתואמות למונחים במילון.
    • ‫dataplex.glossaryTerms.get במונח שאתם מחפשים את הקישורים הרלוונטיים שלו. אם אין לכם את ההרשאה dataplex.glossaryTerms.get למונחים מסוימים, המערכת של Knowledge Catalog מצנזרת את המונחים האלה בתשובה.
    • ‫dataplex.entryLinks.delete בקבוצת הרשומות של Knowledge Catalog בפרויקט שבו הקישור נמצא.
  • ליצור, לחפש ולמחוק קישורים בין מונחים לבין נכסי נתונים או עמודות בפרויקט:
    • ‫dataplex.entryLinks.create בקבוצת הרשומות של המערכת שתואמת לנכסי הנתונים או לעמודות בפרויקט. הקישור נוצר בפרויקט שבו ניתנה ההרשאה.
    • ‫dataplex.entryGroups.useDefinitionEntryLink בקבוצת הרשומות של המערכת שתואמת לנכסי הנתונים או לעמודות בפרויקט. הקישור נוצר בפרויקט שבו ניתנה ההרשאה.
    • ‫dataplex.entries.link בקבוצת הרשומות של המערכת שתואמת לנכסי הנתונים או לעמודות בפרויקט. הקישור נוצר בפרויקט שבו ניתנה ההרשאה.
    • ‫dataplex.glossaryTerms.use במילון שהמונח שלו צריך להיות משויך.
    • הרשאת קריאה במערכת המקור (לדוגמה, bigquery.tables.get או dataplex.glossaryTerms.get) ברשומה שאת הקישורים שלה מחפשים. אם אין לכם הרשאת קריאה במערכת המקור לנכסי נתונים מסוימים, Knowledge Catalog מצנזר אותם בתשובה.
    • ‫dataplex.entryLinks.delete בקבוצת הרשומות של המערכת שבה נמצא הקישור.

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

למידע נוסף, קראו את המאמר תפקידי IAM ב-Knowledge Catalog.

יצירה וניהול של מילוני מונחים ארגוניים

בקטעים הבאים מוסבר איך ליצור, להציג, לערוך ולמחוק מילון מונחים ארגוני. כשיוצרים מילוני מונחים ארגוניים, קטגוריות או מונחים, צריך לוודא שהמזהים שלהם תואמים להנחיות למתן שמות למשאבים ב-Knowledge Catalog.

יצירת מילון מונחים ארגוני

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

  2. לוחצים על יצירת מילון מונחים ארגוני.

  3. בדף Create business glossary, מציינים שם ומיקום למילון המונחים הארגוני. אחרי שיוצרים את מילון המונחים, אי אפשר לשנות את המיקום.

  4. לוחצים על יצירה. מילון המונחים נוצר בפרויקט הנוכחי.

  5. אופציונלי: מוסיפים תיאור קצר בשדה Description (עד 1,024 תווים) או תיאור ארוך בשדה Overview (עד 120KB).

C#‎

C#

לפני שמנסים את הדוגמה הזו, צריך לפעול לפי הוראות ההגדרה של C# במדריך למתחילים של Knowledge Catalog באמצעות ספריות לקוח. למידע נוסף, קראו את מאמרי העזרה של Knowledge Catalog C# API.

כדי לבצע אימות ב-Knowledge Catalog, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.

using Google.Api.Gax.ResourceNames;
using Google.Cloud.Dataplex.V1;
using Google.LongRunning;

public sealed partial class GeneratedBusinessGlossaryServiceClientSnippets
{
    /// <summary>Snippet for CreateGlossary</summary>
    /// <remarks>
    /// This snippet has been automatically generated and should be regarded as a code template only.
    /// It will require modifications to work:
    /// - It may require correct/in-range values for request initialization.
    /// - It may require specifying regional endpoints when creating the service client as shown in
    ///   https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
    /// </remarks>
    public void CreateGlossaryRequestObject()
    {
        // Create client
        BusinessGlossaryServiceClient businessGlossaryServiceClient = BusinessGlossaryServiceClient.Create();
        // Initialize request argument(s)
        CreateGlossaryRequest request = new CreateGlossaryRequest
        {
            ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
            GlossaryId = "",
            Glossary = new Glossary(),
            ValidateOnly = false,
        };
        // Make the request
        Operation<Glossary, OperationMetadata> response = businessGlossaryServiceClient.CreateGlossary(request);

        // Poll until the returned long-running operation is complete
        Operation<Glossary, OperationMetadata> completedResponse = response.PollUntilCompleted();
        // Retrieve the operation result
        Glossary result = completedResponse.Result;

        // Or get the name of the operation
        string operationName = response.Name;
        // This name can be stored, then the long-running operation retrieved later by name
        Operation<Glossary, OperationMetadata> retrievedResponse = businessGlossaryServiceClient.PollOnceCreateGlossary(operationName);
        // Check if the retrieved long-running operation has completed
        if (retrievedResponse.IsCompleted)
        {
            // If it has completed, then access the result
            Glossary retrievedResult = retrievedResponse.Result;
        }
    }
}

המשך

Go

לפני שמנסים את הדוגמה הזו, צריך לפעול לפי הוראות ההגדרה של Go במדריך למתחילים של Knowledge Catalog באמצעות ספריות לקוח. למידע נוסף, קראו את מאמרי העזרה של Knowledge Catalog Go API.

כדי לבצע אימות ב-Knowledge Catalog, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.


//go:build examples

package main

import (
	"context"

	dataplex "cloud.google.com/go/dataplex/apiv1"
	dataplexpb "cloud.google.com/go/dataplex/apiv1/dataplexpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := dataplex.NewBusinessGlossaryClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &dataplexpb.CreateGlossaryRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/dataplex/apiv1/dataplexpb#CreateGlossaryRequest.
	}
	op, err := c.CreateGlossary(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

Java

Java

לפני שמנסים את הדוגמה הזו, צריך לפעול לפי הוראות ההגדרה של Java במדריך למתחילים של Knowledge Catalog באמצעות ספריות לקוח. למידע נוסף, קראו את מאמרי העזרה של Knowledge Catalog Java API.

כדי לבצע אימות ב-Knowledge Catalog, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.

import com.google.cloud.dataplex.v1.BusinessGlossaryServiceClient;
import com.google.cloud.dataplex.v1.CreateGlossaryRequest;
import com.google.cloud.dataplex.v1.Glossary;
import com.google.cloud.dataplex.v1.LocationName;

public class SyncCreateGlossary {

  public static void main(String[] args) throws Exception {
    syncCreateGlossary();
  }

  public static void syncCreateGlossary() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
        BusinessGlossaryServiceClient.create()) {
      CreateGlossaryRequest request =
          CreateGlossaryRequest.newBuilder()
              .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
              .setGlossaryId("glossaryId1849967577")
              .setGlossary(Glossary.newBuilder().build())
              .setValidateOnly(true)
              .build();
      Glossary response = businessGlossaryServiceClient.createGlossaryAsync(request).get();
    }
  }
}

Node.js

Node.js

לפני שמנסים את הדוגמה הזו, צריך לפעול לפי הוראות ההגדרה של Node.js במדריך למתחילים של Knowledge Catalog באמצעות ספריות לקוח. למידע נוסף, קראו את מאמרי העזרה של Knowledge Catalog Node.js API.

כדי לבצע אימות ב-Knowledge Catalog, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.

/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. The parent resource where this Glossary will be created.
 *  Format: projects/{project_id_or_number}/locations/{location_id}
 *  where `location_id` refers to a Google Cloud region.
 */
// const parent = 'abc123'
/**
 *  Required. Glossary ID: Glossary identifier.
 */
// const glossaryId = 'abc123'
/**
 *  Required. The Glossary to create.
 */
// const glossary = {}
/**
 *  Optional. Validates the request without actually creating the Glossary.
 *  Default: false.
 */
// const validateOnly = true

// Imports the Dataplex library
const {BusinessGlossaryServiceClient} = require('@google-cloud/dataplex').v1;

// Instantiates a client
const dataplexClient = new BusinessGlossaryServiceClient();

async function callCreateGlossary() {
  // Construct request
  const request = {
    parent,
    glossaryId,
    glossary,
  };

  // Run request
  const [operation] = await dataplexClient.createGlossary(request);
  const [response] = await operation.promise();
  console.log(response);
}

callCreateGlossary();

Python

Python

לפני שמנסים את הדוגמה הזו, צריך לפעול לפי הוראות ההגדרה של Python במדריך למתחילים של Knowledge Catalog באמצעות ספריות לקוח. למידע נוסף, קראו את מאמרי העזרה של Knowledge Catalog Python API.

כדי לבצע אימות ב-Knowledge Catalog, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1


def sample_create_glossary():
    # Create a client
    client = dataplex_v1.BusinessGlossaryServiceClient()

    # Initialize request argument(s)
    request = dataplex_v1.CreateGlossaryRequest(
        parent="parent_value",
        glossary_id="glossary_id_value",
    )

    # Make the request
    operation = client.create_glossary(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)

Ruby

Ruby

לפני שמנסים את הדוגמה הזו, צריך לפעול לפי הוראות ההגדרה של Ruby במדריך למתחילים של Knowledge Catalog באמצעות ספריות לקוח. למידע נוסף, קראו את מאמרי העזרה של Knowledge Catalog Ruby API.

כדי לבצע אימות ב-Knowledge Catalog, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.

require "google/cloud/dataplex/v1"

##
# Snippet for the create_glossary call in the BusinessGlossaryService service
#
# This snippet has been automatically generated and should be regarded as a code
# template only. It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in https://cloud.google.com/ruby/docs/reference.
#
# This is an auto-generated example demonstrating basic usage of
# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#create_glossary.
#
def create_glossary
  # Create a client object. The client can be reused for multiple calls.
  client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

  # Create a request. To set request fields, pass in keyword arguments.
  request = Google::Cloud::Dataplex::V1::CreateGlossaryRequest.new

  # Call the create_glossary method.
  result = client.create_glossary request

  # The returned object is of type Gapic::Operation. You can use it to
  # check the status of an operation, cancel it, or wait for results.
  # Here is how to wait for a response.
  result.wait_until_done! timeout: 60
  if result.response?
    p result.response
  else
    puts "No response received."
  end
end

REST

כשיוצרים מילון, Knowledge Catalog יוצר רשומה שמייצגת את המילון.

  1. יוצרים את מילון המונחים.

    alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'
    
    gcurl -X POST https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/glossaries?glossary_id=GLOSSARY_ID --data @- << EOF
    {
    "displayName": "DISPLAY_NAME",
    "description": "DESCRIPTION"
    }
    EOF

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

    • ‫PROJECT_ID: מזהה הפרויקט שבו רוצים ליצור את מילון המונחים
    • ‫LOCATION_ID: המזהה של המיקום שבו רוצים ליצור את מילון המונחים
    • ‫GLOSSARY_ID: מזהה מילון המונחים
    • ‫DISPLAY_NAME: השם המוצג של מילון המונחים
    • ‫DESCRIPTION: תיאור מילון המונחים, עד 1,024 תווים
  2. אופציונלי: מוסיפים סקירה כללית למילון המונחים.

    1. מחפשים את הערך במילון המונחים:

      gcurl -X GET https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID
      :lookupEntry\
      ?entry=projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID
      \
      \&view=ALL

      מחליפים את PROJECT_NUMBER במספר הפרויקט שבו נוצר מילון המונחים.

    2. מוסיפים סקירה כללית למילון:

      gcurl -X PATCH https://dataplex.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID\
      ?update_mask=aspects\
      \&deleteMissingAspects=false\
      \&aspect_keys=projects/dataplex-types/locations/global/aspectTypes/overview \
      --data @- << EOF
      {
      "aspects": {
         "dataplex-types.global.overview": {
            "aspect_type": "projects/dataplex-types/locations/global/aspectTypes/overview",
            "data": {
            "content": "OVERVIEW",
            "links": []
            },
         }
      }
      }
      EOF

      מחליפים את OVERVIEW בטקסט פשוט או ב-HTML כדי לתאר את הקטגוריה או המונח במילון המונחים.

הצגת מילוני המונחים הזמינים

המסוף

  • נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

    בחלונית My glossaries מוצגים כל מונחוני הארגון שיש לכם הרשאה לצפות בהם, יחד עם התיאורים שלהם וחותמות הזמן של השינוי האחרון.

C#‎

C#

לפני שמנסים את הדוגמה הזו, צריך לפעול לפי הוראות ההגדרה של C# במדריך למתחילים של Knowledge Catalog באמצעות ספריות לקוח. למידע נוסף, קראו את מאמרי העזרה של Knowledge Catalog C# API.

כדי לבצע אימות ב-Knowledge Catalog, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.

using Google.Api.Gax;
using Google.Api.Gax.ResourceNames;
using Google.Cloud.Dataplex.V1;
using System;

public sealed partial class GeneratedBusinessGlossaryServiceClientSnippets
{
    /// <summary>Snippet for ListGlossaries</summary>
    /// <remarks>
    /// This snippet has been automatically generated and should be regarded as a code template only.
    /// It will require modifications to work:
    /// - It may require correct/in-range values for request initialization.
    /// - It may require specifying regional endpoints when creating the service client as shown in
    ///   https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
    /// </remarks>
    public void ListGlossariesRequestObject()
    {
        // Create client
        BusinessGlossaryServiceClient businessGlossaryServiceClient = BusinessGlossaryServiceClient.Create();
        // Initialize request argument(s)
        ListGlossariesRequest request = new ListGlossariesRequest
        {
            ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
            Filter = "",
            OrderBy = "",
        };
        // Make the request
        PagedEnumerable<ListGlossariesResponse, Glossary> response = businessGlossaryServiceClient.ListGlossaries(request);

        // Iterate over all response items, lazily performing RPCs as required
        foreach (Glossary item in response)
        {
            // Do something with each item
            Console.WriteLine(item);
        }

        // Or iterate over pages (of server-defined size), performing one RPC per page
        foreach (ListGlossariesResponse page in response.AsRawResponses())
        {
            // Do something with each page of items
            Console.WriteLine("A page of results:");
            foreach (Glossary item in page)
            {
                // Do something with each item
                Console.WriteLine(item);
            }
        }

        // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
        int pageSize = 10;
        Page<Glossary> singlePage = response.ReadPage(pageSize);
        // Do something with the page of items
        Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
        foreach (Glossary item in singlePage)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
        // Store the pageToken, for when the next page is required.
        string nextPageToken = singlePage.NextPageToken;
    }
}

המשך

Go

לפני שמנסים את הדוגמה הזו, צריך לפעול לפי הוראות ההגדרה של Go במדריך למתחילים של Knowledge Catalog באמצעות ספריות לקוח. למידע נוסף, קראו את מאמרי העזרה של Knowledge Catalog Go API.

כדי לבצע אימות ב-Knowledge Catalog, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.


//go:build examples

package main

import (
	"context"

	dataplex "cloud.google.com/go/dataplex/apiv1"
	dataplexpb "cloud.google.com/go/dataplex/apiv1/dataplexpb"
	"google.golang.org/api/iterator"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := dataplex.NewBusinessGlossaryClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &dataplexpb.ListGlossariesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/dataplex/apiv1/dataplexpb#ListGlossariesRequest.
	}
	it := c.ListGlossaries(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp

		// If you need to access the underlying RPC response,
		// you can do so by casting the `Response` as below.
		// Otherwise, remove this line. Only populated after
		// first call to Next(). Not safe for concurrent access.
		_ = it.Response.(*dataplexpb.ListGlossariesResponse)
	}
}

Java

Java

לפני שמנסים את הדוגמה הזו, צריך לפעול לפי הוראות ההגדרה של Java במדריך למתחילים של Knowledge Catalog באמצעות ספריות לקוח. למידע נוסף, קראו את מאמרי העזרה של Knowledge Catalog Java API.

כדי לבצע אימות ב-Knowledge Catalog, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.

import com.google.cloud.dataplex.v1.BusinessGlossaryServiceClient;
import com.google.cloud.dataplex.v1.Glossary;
import com.google.cloud.dataplex.v1.ListGlossariesRequest;
import com.google.cloud.dataplex.v1.LocationName;

public class SyncListGlossaries {

  public static void main(String[] args) throws Exception {
    syncListGlossaries();
  }

  public static void syncListGlossaries() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
        BusinessGlossaryServiceClient.create()) {
      ListGlossariesRequest request =
          ListGlossariesRequest.newBuilder()
              .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
              .setPageSize(883849137)
              .setPageToken("pageToken873572522")
              .setFilter("filter-1274492040")
              .setOrderBy("orderBy-1207110587")
              .build();
      for (Glossary element : businessGlossaryServiceClient.listGlossaries(request).iterateAll()) {
        // doThingsWith(element);
      }
    }
  }
}

Node.js

Node.js

לפני שמנסים את הדוגמה הזו, צריך לפעול לפי הוראות ההגדרה של Node.js במדריך למתחילים של Knowledge Catalog באמצעות ספריות לקוח. למידע נוסף, קראו את מאמרי העזרה של Knowledge Catalog Node.js API.

כדי לבצע אימות ב-Knowledge Catalog, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.

/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. The parent, which has this collection of Glossaries.
 *  Format: projects/{project_id_or_number}/locations/{location_id}
 *  where `location_id` refers to a Google Cloud region.
 */
// const parent = 'abc123'
/**
 *  Optional. The maximum number of Glossaries to return. The service may
 *  return fewer than this value. If unspecified, at most 50 Glossaries will be
 *  returned. The maximum value is 1000; values above 1000 will be coerced to
 *  1000.
 */
// const pageSize = 1234
/**
 *  Optional. A page token, received from a previous `ListGlossaries` call.
 *  Provide this to retrieve the subsequent page.
 *  When paginating, all other parameters provided to `ListGlossaries` must
 *  match the call that provided the page token.
 */
// const pageToken = 'abc123'
/**
 *  Optional. Filter expression that filters Glossaries listed in the response.
 *  Filters on proto fields of Glossary are supported.
 *  Examples of using a filter are:
 *    - `display_name="my-glossary"`
 *    - `categoryCount=1`
 *    - `termCount=0`
 */
// const filter = 'abc123'
/**
 *  Optional. Order by expression that orders Glossaries listed in the
 *  response. Order by fields are: `name` or `create_time` for the result. If
 *  not specified, the ordering is undefined.
 */
// const orderBy = 'abc123'

// Imports the Dataplex library
const {BusinessGlossaryServiceClient} = require('@google-cloud/dataplex').v1;

// Instantiates a client
const dataplexClient = new BusinessGlossaryServiceClient();

async function callListGlossaries() {
  // Construct request
  const request = {
    parent,
  };

  // Run request
  const iterable = dataplexClient.listGlossariesAsync(request);
  for await (const response of iterable) {
      console.log(response);
  }
}

callListGlossaries();

Python

Python

לפני שמנסים את הדוגמה הזו, צריך לפעול לפי הוראות ההגדרה של Python במדריך למתחילים של Knowledge Catalog באמצעות ספריות לקוח. למידע נוסף, קראו את מאמרי העזרה של Knowledge Catalog Python API.

כדי לבצע אימות ב-Knowledge Catalog, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1


def sample_list_glossaries():
    # Create a client
    client = dataplex_v1.BusinessGlossaryServiceClient()

    # Initialize request argument(s)
    request = dataplex_v1.ListGlossariesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_glossaries(request=request)

    # Handle the response
    for response in page_result:
        print(response)

Ruby

Ruby

לפני שמנסים את הדוגמה הזו, צריך לפעול לפי הוראות ההגדרה של Ruby במדריך למתחילים של Knowledge Catalog באמצעות ספריות לקוח. למידע נוסף, קראו את מאמרי העזרה של Knowledge Catalog Ruby API.

כדי לבצע אימות ב-Knowledge Catalog, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.

require "google/cloud/dataplex/v1"

##
# Snippet for the list_glossaries call in the BusinessGlossaryService service
#
# This snippet has been automatically generated and should be regarded as a code
# template only. It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in https://cloud.google.com/ruby/docs/reference.
#
# This is an auto-generated example demonstrating basic usage of
# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#list_glossaries.
#
def list_glossaries
  # Create a client object. The client can be reused for multiple calls.
  client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

  # Create a request. To set request fields, pass in keyword arguments.
  request = Google::Cloud::Dataplex::V1::ListGlossariesRequest.new

  # Call the list_glossaries method.
  result = client.list_glossaries request

  # The returned object is of type Gapic::PagedEnumerable. You can iterate
  # over elements, and API calls will be issued to fetch pages as needed.
  result.each do |item|
    # Each element is of type ::Google::Cloud::Dataplex::V1::Glossary.
    p item
  end
end

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X GET https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/glossaries

עריכת מילון מונחים

אתם יכולים לערוך את השם והתיאור של מילון המונחים.

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

  2. לוחצים על מילון המונחים שרוצים לערוך.

  3. לוחצים על Edit לצד השם, התיאור או הסקירה הכללית, ואז מבצעים את השינוי.

  4. לוחצים על Save.

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X PATCH https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/glossaries/GLOSSARY_ID?update_mask=displayName,description --data @- << EOF
{
"displayName": "DISPLAY_NAME",
"description": "DESCRIPTION"
}
EOF

מחיקת מילון מונחים

כדי למחוק מילון מונחים, קודם צריך למחוק את כל הקטגוריות והמונחים שבו.

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

  2. לוחצים על מילון המונחים שרוצים למחוק.

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

C#‎

C#

לפני שמנסים את הדוגמה הזו, צריך לפעול לפי הוראות ההגדרה של C# במדריך למתחילים של Knowledge Catalog באמצעות ספריות לקוח. למידע נוסף, קראו את מאמרי העזרה של Knowledge Catalog C# API.

כדי לבצע אימות ב-Knowledge Catalog, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.

using Google.Cloud.Dataplex.V1;
using Google.LongRunning;
using Google.Protobuf.WellKnownTypes;

public sealed partial class GeneratedBusinessGlossaryServiceClientSnippets
{
    /// <summary>Snippet for DeleteGlossary</summary>
    /// <remarks>
    /// This snippet has been automatically generated and should be regarded as a code template only.
    /// It will require modifications to work:
    /// - It may require correct/in-range values for request initialization.
    /// - It may require specifying regional endpoints when creating the service client as shown in
    ///   https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
    /// </remarks>
    public void DeleteGlossaryRequestObject()
    {
        // Create client
        BusinessGlossaryServiceClient businessGlossaryServiceClient = BusinessGlossaryServiceClient.Create();
        // Initialize request argument(s)
        DeleteGlossaryRequest request = new DeleteGlossaryRequest
        {
            GlossaryName = GlossaryName.FromProjectLocationGlossary("[PROJECT]", "[LOCATION]", "[GLOSSARY]"),
            Etag = "",
        };
        // Make the request
        Operation<Empty, OperationMetadata> response = businessGlossaryServiceClient.DeleteGlossary(request);

        // Poll until the returned long-running operation is complete
        Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
        // Retrieve the operation result
        Empty result = completedResponse.Result;

        // Or get the name of the operation
        string operationName = response.Name;
        // This name can be stored, then the long-running operation retrieved later by name
        Operation<Empty, OperationMetadata> retrievedResponse = businessGlossaryServiceClient.PollOnceDeleteGlossary(operationName);
        // Check if the retrieved long-running operation has completed
        if (retrievedResponse.IsCompleted)
        {
            // If it has completed, then access the result
            Empty retrievedResult = retrievedResponse.Result;
        }
    }
}

המשך

Go

לפני שמנסים את הדוגמה הזו, צריך לפעול לפי הוראות ההגדרה של Go במדריך למתחילים של Knowledge Catalog באמצעות ספריות לקוח. למידע נוסף, קראו את מאמרי העזרה של Knowledge Catalog Go API.

כדי לבצע אימות ב-Knowledge Catalog, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.


//go:build examples

package main

import (
	"context"

	dataplex "cloud.google.com/go/dataplex/apiv1"
	dataplexpb "cloud.google.com/go/dataplex/apiv1/dataplexpb"
)

func main() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := dataplex.NewBusinessGlossaryClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &dataplexpb.DeleteGlossaryRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/dataplex/apiv1/dataplexpb#DeleteGlossaryRequest.
	}
	op, err := c.DeleteGlossary(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

Java

Java

לפני שמנסים את הדוגמה הזו, צריך לפעול לפי הוראות ההגדרה של Java במדריך למתחילים של Knowledge Catalog באמצעות ספריות לקוח. למידע נוסף, קראו את מאמרי העזרה של Knowledge Catalog Java API.

כדי לבצע אימות ב-Knowledge Catalog, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.

import com.google.cloud.dataplex.v1.BusinessGlossaryServiceClient;
import com.google.cloud.dataplex.v1.DeleteGlossaryRequest;
import com.google.cloud.dataplex.v1.GlossaryName;
import com.google.protobuf.Empty;

public class SyncDeleteGlossary {

  public static void main(String[] args) throws Exception {
    syncDeleteGlossary();
  }

  public static void syncDeleteGlossary() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
        BusinessGlossaryServiceClient.create()) {
      DeleteGlossaryRequest request =
          DeleteGlossaryRequest.newBuilder()
              .setName(GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString())
              .setEtag("etag3123477")
              .build();
      businessGlossaryServiceClient.deleteGlossaryAsync(request).get();
    }
  }
}

Node.js

Node.js

לפני שמנסים את הדוגמה הזו, צריך לפעול לפי הוראות ההגדרה של Node.js במדריך למתחילים של Knowledge Catalog באמצעות ספריות לקוח. למידע נוסף, קראו את מאמרי העזרה של Knowledge Catalog Node.js API.

כדי לבצע אימות ב-Knowledge Catalog, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.

/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. The name of the Glossary to delete.
 *  Format:
 *  projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
 */
// const name = 'abc123'
/**
 *  Optional. The etag of the Glossary.
 *  If this is provided, it must match the server's etag.
 *  If the etag is provided and does not match the server-computed etag,
 *  the request must fail with a ABORTED error code.
 */
// const etag = 'abc123'

// Imports the Dataplex library
const {BusinessGlossaryServiceClient} = require('@google-cloud/dataplex').v1;

// Instantiates a client
const dataplexClient = new BusinessGlossaryServiceClient();

async function callDeleteGlossary() {
  // Construct request
  const request = {
    name,
  };

  // Run request
  const [operation] = await dataplexClient.deleteGlossary(request);
  const [response] = await operation.promise();
  console.log(response);
}

callDeleteGlossary();

Python

Python

לפני שמנסים את הדוגמה הזו, צריך לפעול לפי הוראות ההגדרה של Python במדריך למתחילים של Knowledge Catalog באמצעות ספריות לקוח. למידע נוסף, קראו את מאמרי העזרה של Knowledge Catalog Python API.

כדי לבצע אימות ב-Knowledge Catalog, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import dataplex_v1


def sample_delete_glossary():
    # Create a client
    client = dataplex_v1.BusinessGlossaryServiceClient()

    # Initialize request argument(s)
    request = dataplex_v1.DeleteGlossaryRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_glossary(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)

Ruby

Ruby

לפני שמנסים את הדוגמה הזו, צריך לפעול לפי הוראות ההגדרה של Ruby במדריך למתחילים של Knowledge Catalog באמצעות ספריות לקוח. למידע נוסף, קראו את מאמרי העזרה של Knowledge Catalog Ruby API.

כדי לבצע אימות ב-Knowledge Catalog, צריך להגדיר את Application Default Credentials. למידע נוסף, ראו הגדרת אימות לסביבת פיתוח מקומית.

require "google/cloud/dataplex/v1"

##
# Snippet for the delete_glossary call in the BusinessGlossaryService service
#
# This snippet has been automatically generated and should be regarded as a code
# template only. It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in https://cloud.google.com/ruby/docs/reference.
#
# This is an auto-generated example demonstrating basic usage of
# Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client#delete_glossary.
#
def delete_glossary
  # Create a client object. The client can be reused for multiple calls.
  client = Google::Cloud::Dataplex::V1::BusinessGlossaryService::Client.new

  # Create a request. To set request fields, pass in keyword arguments.
  request = Google::Cloud::Dataplex::V1::DeleteGlossaryRequest.new

  # Call the delete_glossary method.
  result = client.delete_glossary request

  # The returned object is of type Gapic::Operation. You can use it to
  # check the status of an operation, cancel it, or wait for results.
  # Here is how to wait for a response.
  result.wait_until_done! timeout: 60
  if result.response?
    p result.response
  else
    puts "No response received."
  end
end

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X DELETE https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/glossaries/GLOSSARY_ID

יצירה וניהול של קטגוריות

בקטעים הבאים מוסבר איך ליצור, להציג, לעדכן ולמחוק קטגוריות.

יצירת קטגוריה במילון מונחים

מילון המונחים הארגוני יכול לכלול עד 200 קטגוריות.

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

  2. בוחרים את מילון המונחים שבו רוצים ליצור קטגוריה ולוחצים על Create category.

  3. מזינים שם לקטגוריה.

  4. לוחצים על יצירה.

  5. אופציונלי: מוסיפים תיאור קצר בשדה Description (עד 1,024 תווים) או תיאור ארוך בשדה Overview (עד 120KB).

REST

כשיוצרים קטגוריה, Knowledge Catalog יוצר רשומה שמייצגת את הקטגוריה.

  1. יוצרים את הקטגוריה.

    alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'
    
    gcurl -X POST https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/glossaries/GLOSSARY_ID/categories?category_id=CATEGORY_ID --data @- << EOF
    {
    "displayName": "CATEGORY_DISPLAY_NAME",
    "description": "CATEGORY_DESCRIPTION",
    "parent": "projects/PROJECT_ID/locations/LOCATION_ID/glossaries/GLOSSARY_ID"
    }
    EOF

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

    • ‫CATEGORY_ID: מזהה הקטגוריה
    • ‫CATEGORY_DISPLAY_NAME: השם המוצג של הקטגוריה
    • ‫CATEGORY_DESCRIPTION: תיאור הקטגוריה
  2. אופציונלי: מוסיפים סקירה כללית לקטגוריה.

    1. מחפשים את הרשומה של הקטגוריה:

      gcurl -X GET https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID
      :lookupEntry\
      ?entry=projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/categories/CATEGORY_ID
      \
      \&view=ALL
    2. מוסיפים סקירה כללית לקטגוריה:

      gcurl -X PATCH https://dataplex.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/categories/CATEGORY_ID\
      ?update_mask=aspects\
      \&deleteMissingAspects=false\
      \&aspect_keys=projects/dataplex-types/locations/global/aspectTypes/overview
      \
      --data @- << EOF
      {
      "aspects": {
      "dataplex-types.global.overview": {
         "aspect_type":"projects/dataplex-types/locations/global/aspectTypes/overview
      ",
         "data": {
         "content": "OVERVIEW",
         "links": []
         },
      }
      }
      }
      EOF

      מחליפים את OVERVIEW בטקסט פשוט או ב-HTML כדי לתאר את הקטגוריה או המונח במילון המונחים.

  3. אופציונלי: הוספת אנשי קשר

    1. מחפשים את הרשומה של הקטגוריה:

      gcurl -X GET https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID
      :lookupEntry\
      ?entry=projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/categories/CATEGORY_ID
      \
      \&view=ALL
    2. מעדכנים את הרשומה של הקטגוריה עם אנשי הקשר:

      gcurl -X PATCH https://dataplex.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/categories/CATEGORY_ID\
      ?update_mask=aspects\
      \&deleteMissingAspects=false\
      \&aspect_keys=projects/dataplex-types/locations/global/aspectTypes/contacts \
      --data @- << EOF
      {
      "aspects": {
      "dataplex-types.global.contacts": {
         "aspect_type": "projects/dataplex-types/locations/global/aspectTypes/contacts",
         "data": {
         "identities": [
            {
               "role": "steward",
               "name": "CONTACT_NAME",
               "id": "CONTACT_EMAIL"
            }
         ]
         },
      }
      }
      }
      EOF

יצירת קטגוריה משנית

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

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

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

  3. בוחרים את קטגוריית ההורה שבה רוצים ליצור קטגוריה נוספת ולוחצים על יצירת קטגוריה.

  4. מזינים שם לקטגוריה.

  5. לוחצים על יצירה.

  6. אופציונלי: מוסיפים תיאור קצר בשדה Description (עד 1,024 תווים) או תיאור ארוך בשדה Overview (עד 120KB).

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X POST https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/glossaries/GLOSSARY_ID/categories?category_id=CATEGORY_ID --data @- << EOF
{
  "displayName": "CATEGORY_DISPLAY_NAME",
  "description": "CATEGORY_DESCRIPTION",
  "parent": "projects/PROJECT_ID/locations/LOCATION_ID/glossaries/GLOSSARY_ID/categories/PARENT_CATEGORY_ID"
}
EOF

מחליפים את PARENT_CATEGORY_ID במזהה של קטגוריית ההורה.

הצגת הקטגוריות ששייכות למילון מונחים

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

  2. כדי לראות את הקטגוריות במילון, מרחיבים את המילון.

  3. כדי לראות את הקטגוריות המשניות בקטגוריה מסוימת, מרחיבים את הקטגוריה.

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X GET https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/glossaries/GLOSSARY_ID/categories

עריכת קטגוריה

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

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

  2. מרחיבים את מילון המונחים ולוחצים על הקטגוריה שרוצים לערוך.

  3. לוחצים על Edit ליד השם, התיאור או הסקירה הכללית, ואז מבצעים את השינוי.

  4. לוחצים על Save.

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X PATCH https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/glossaries/GLOSSARY_ID/categories/CATEGORY_ID?update_mask=displayName,description --data @- << EOF
{
"displayName": "CATEGORY_DISPLAY_NAME",
"description": "DESCRIPTION"
}
EOF

מחיקת קטגוריה

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

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

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

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X DELETE https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/glossaries/GLOSSARY_ID/categories/CATEGORY_ID

יצירה וניהול של מונחים

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

יצירת מונח במילון המונחים הארגוני

במילון המונחים הארגוני יכולים להיות עד 5,000 מונחים.

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

  2. כדי ליצור מונח ברמת מילון המונחים, בוחרים את מילון המונחים שבו רוצים ליצור מונח ולוחצים על Create term.

  3. מזינים שם למונח.

  4. לוחצים על יצירה.

  5. אופציונלי: מוסיפים תיאור קצר בשדה Description (עד 1,024 תווים) או תיאור ארוך בשדה Overview (עד 120KB).

  6. אופציונלי: כדי להוסיף אנשי קשר, לוחצים על Edit ומזינים רשימה של כתובות אימייל של מנהלי מדיניות המידע הארגונית, הבעלים של המידע או הבעלים של דומיין המידע. לאחר מכן לוחצים על שמירה.

REST

כשיוצרים מונח, Knowledge Catalog יוצר רשומה שמייצגת את המונח.

  1. יוצרים את המונח.

    alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'
    
    gcurl -X POST https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms?term_id=TERM_ID --data @- << EOF
    {
    "displayName": "TERM_DISPLAY_NAME",
    "description": "TERM_DESCRIPTION",
    "parent": "projects/PROJECT_ID/locations/LOCATION_ID/glossaries/GLOSSARY_ID"
    }
    EOF

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

    • ‫TERM_ID: המזהה של המונח שיוצרים
    • ‫TERM_DISPLAY_NAME: השם המוצג של המונח שאתם יוצרים
    • ‫TERM_DESCRIPTION: התיאור של המונח שיוצרים
  2. אם רוצים, מוסיפים סקירה כללית למונח.

    1. מחפשים את הערך של המונח:

      gcurl -X GET https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID
      :lookupEntry\
      ?entry=projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms/TERM_ID
      \
      \&view=ALL
    2. מוסיפים סקירה כללית למונח:

      gcurl -X PATCH https://dataplex.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms/TERM_ID
      \
      ?update_mask=aspects\
      \&deleteMissingAspects=false\
      \&aspect_keys=projects/dataplex-types/locations/global/aspectTypes/overview
      \
      --data @- << EOF
      {
      "aspects": {
      "dataplex-types.global.overview": {
         "aspect_type":"projects/dataplex-types/locations/global/aspectTypes/overview
      ",
         "data": {
         "content": "OVERVIEW",
         "links": []
         },
      }
      }
      }
      EOF

      מחליפים את OVERVIEW בטקסט פשוט או ב-HTML כדי לתאר את הקטגוריה או המונח במילון המונחים.

  3. אם רוצים, מוסיפים אנשי קשר.

    1. מחפשים את הערך של המונח:

      gcurl -X GET https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID
      :lookupEntry\
      ?entry=projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms/TERM_ID
      \
      \&view=ALL
    2. מעדכנים את הרשומה של המונח עם אנשי הקשר:

      gcurl -X PATCH https://dataplex.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms/TERM_ID
      ?update_mask=aspects\
      \&deleteMissingAspects=false\
      \&aspect_keys=projects/dataplex-types/locations/global/aspectTypes/contacts \
      --data @- << EOF
      {
      "aspects": {
      "dataplex-types.global.contacts": {
         "aspect_type": "projects/dataplex-types/locations/global/aspectTypes/contacts",
         "data": {
         "identities": [
            {
               "role": "steward",
               "name": "CONTACT_NAME",
               "id": "CONTACT_EMAIL"
            }
         ]
         },
      }
      }
      }
      EOF

יצירת מונח בקטגוריה

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

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

  3. מזינים שם למונח.

  4. לוחצים על יצירה.

  5. אופציונלי: מוסיפים תיאור קצר בשדה Description (עד 1,024 תווים) או תיאור ארוך בשדה Overview (עד 120KB).

  6. אופציונלי: כדי להוסיף אנשי קשר, לוחצים על Edit ומזינים רשימה של כתובות אימייל של מנהלי מדיניות המידע הארגונית, הבעלים של המידע או הבעלים של דומיין המידע. לאחר מכן לוחצים על שמירה.

REST

כשיוצרים מונח, Knowledge Catalog יוצר רשומה שמייצגת את המונח.

  1. יוצרים מונח.

    alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'
    
    gcurl -X POST https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms?term_id=TERM_ID --data @- << EOF
    {
    "displayName": "TERM_DISPLAY_NAME",
    "description": "TERM_DESCRIPTION",
    "parent": "projects/PROJECT_ID/locations/LOCATION_ID/glossaries/GLOSSARY_ID/categories/PARENT_CATEGORY_ID"
    }
    EOF

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

    • ‫TERM_ID: המזהה של המונח שיוצרים
    • ‫TERM_DISPLAY_NAME: השם המוצג של המונח שאתם יוצרים
    • ‫TERM_DESCRIPTION: התיאור של המונח שיוצרים
  2. אם רוצים, מוסיפים סקירה כללית למונח.

    1. מחפשים את הערך של המונח:

      gcurl -X GET https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID
      :lookupEntry\
      ?entry=projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms/TERM_ID
      \
      \&view=ALL
    2. מוסיפים סקירה כללית למונח:

      gcurl -X PATCH https://dataplex.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms/TERM_ID
      \
      ?update_mask=aspects\
      \&deleteMissingAspects=false\
      \&aspect_keys=projects/dataplex-types/locations/global/aspectTypes/overview
      \
      --data @- << EOF
      {
      "aspects": {
      "dataplex-types.global.overview": {
         "aspect_type":"projects/dataplex-types/locations/global/aspectTypes/overview
      ",
         "data": {
         "content": "OVERVIEW",
         "links": []
         },
      }
      }
      }
      EOF

      מחליפים את OVERVIEW בטקסט פשוט או ב-HTML כדי לתאר את הקטגוריה או המונח במילון המונחים.

  3. אם רוצים, מוסיפים אנשי קשר.

    1. מחפשים את הערך של המונח:

      gcurl -X GET https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID
      :lookupEntry\
      ?entry=projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms/TERM_ID
      \
      \&view=ALL
    2. מעדכנים את הרשומה של המונח עם אנשי הקשר:

      gcurl -X PATCH https://dataplex.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms/TERM_ID
      ?update_mask=aspects\
      \&deleteMissingAspects=false\
      \&aspect_keys=projects/dataplex-types/locations/global/aspectTypes/contacts \
      --data @- << EOF
      {
      "aspects": {
      "dataplex-types.global.contacts": {
         "aspect_type": "projects/dataplex-types/locations/global/aspectTypes/contacts",
         "data": {
         "identities": [
            {
               "role": "steward",
               "name": "CONTACT_NAME",
               "id": "CONTACT_EMAIL"
            }
         ]
         },
      }
      }
      }
      EOF

הוספת היבט למונח

אפשר להוסיף היבטים למונחים כדי לספק הקשר או מטא-נתונים נוספים.

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

  2. מרחיבים את מילון המונחים ולוחצים על המונח שרוצים להוסיף לו היבט.

  3. בקטע Aspects, לוחצים על Add.

  4. מחפשים את ההיבט, מזינים את הפרטים שלו ולוחצים על Save.

REST

המונחים במילון הם רשומות. כדי לצרף היבט, צריך לתקן את משאב הרשומה. קבוצת הרשומות של מילוני המונחים היא @dataplex.

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X PATCH https://dataplex.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms/TERM_ID?update_mask=aspects\&aspect_keys=ASPECT_PROJECT_ID.ASPECT_LOCATION_ID.ASPECT_TYPE_ID --data @- << EOF
{
 "aspects": {
   "ASPECT_PROJECT_ID.ASPECT_LOCATION_ID.ASPECT_TYPE_ID": {
     "aspect_type": "projects/ASPECT_PROJECT_ID/locations/ASPECT_LOCATION_ID/aspectTypes/ASPECT_TYPE_ID",
     "data": {
       "sensitivity": "HIGH",
       "data_owner": "achalg@google.com"
     }
   }
 }
}
EOF

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

  • ‫PROJECT_NUMBER: מספר הפרויקט שמכיל את המונח במילון המונחים.
  • ‫LOCATION_ID: המיקום של המונח במילון המונחים.
  • ‫GLOSSARY_ID: המזהה של מילון המונחים שמכיל את המונח.
  • ‫TERM_ID: המזהה של המונח שאליו רוצים לצרף את ההיבט.
  • ‫ASPECT_PROJECT_ID: מזהה הפרויקט שמכיל את סוג ההיבט.
  • ASPECT_LOCATION_ID: המיקום של סוג ההיבט.
  • ‫ASPECT_TYPE_ID: המזהה של סוג ההיבט.

הצגת המונחים במילון או בקטגוריה

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

  2. כדי לראות את המונחים במילון, מרחיבים את המילון. כדי לראות את המונחים בקטגוריה מסוימת במילון, צריך להרחיב את הקטגוריה. כדי לראות את המונחים בקטגוריה משנית, מרחיבים את הקטגוריה המשנית.

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X GET https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms

הצגת פרטי המונח

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

  2. כדי לראות את רשימת המונחים במילון, מרחיבים את המילון.

  3. לוחצים על מונח. בדף Term details מוצגים שם המונח, התיאור, מונחים קשורים, מילים נרדפות ורשומות קשורות.

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X GET https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms/TERM_ID

עריכת מונח

אפשר לערוך את השם, התיאור, הסקירה הכללית, אנשי הקשר והמונח הראשי של מונח.

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

  2. מרחיבים את מילון המונחים ולוחצים על המונח שרוצים לערוך.

  3. לוחצים על Edit.

  4. עורכים את השדות הרצויים ולוחצים על שמירה.

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X PATCH https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms/TERM_ID?update_mask=displayName,description --data @- << EOF
{
  "displayName": "TERM_DISPLAY_NAME",
  "description": "TERM_DESCRIPTION"
}
EOF

מחיקת מונח

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

  2. מרחיבים את מילון המונחים ולוחצים על המונח שרוצים למחוק.

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

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X DELETE https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms/TERM_ID

אתם יכולים להוסיף קשרים בין מונחים על ידי קישור שלהם כמילים נרדפות או כמונחים קשורים.

הקשרים בין המונחים הם דו-כיווניים. לדוגמה, כשמקשרים את profit כמילה נרדפת של earnings, גם earnings הופכת למילה נרדפת של profit.

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

  2. מרחיבים את מילון המונחים ולוחצים על המונח שרוצים ליצור איתו קישורים.

  3. לוחצים על עריכה לצד מונחים נרדפים.

  4. מחפשים את המונחים שרוצים לקשר אליהם ובוחרים אותם.

    המונח מקושר מיד כשבוחרים אותו.

  5. לוחצים על Close.

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X POST https://dataplex.googleapis.com/v1/projects/TERM1_PROJECT_ID/locations/TERM1_LOCATION_ID/entryGroups/@dataplex/entryLinks?entry_link_id=ENTRY_LINK_ID -d "$(cat<<EOF
{
  "entry_link_type": "projects/dataplex-types/locations/global/entryLinkTypes/synonym",
"entry_references": [{
     "name": "projects/TERM1_PROJECT_NUMBER/locations/TERM1_LOCATION_ID/entryGroups/@dataplex/entries/projects/TERM1_PROJECT_NUMBER/locations/TERM1_LOCATION_ID/glossaries/TERM1_GLOSSARY_ID/terms/TERM1_ID",
     "type": "UNSPECIFIED"
  }, {
     "name": "projects/TERM2_PROJECT_NUMBER/locations/TERM2_LOCATION_ID/entryGroups/@dataplex/entries/projects/TERM2_PROJECT_NUMBER/locations/TERM2_LOCATION_ID/glossaries/TERM2_GLOSSARY_ID/terms/TERM2_ID",
     "type": "UNSPECIFIED"
  }
  ]

}
EOF
)"

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

  • ‫TERM1_PROJECT_NUMBER: מספר הפרויקט של המונח הראשון שמקושר.
  • ‫TERM1_LOCATION_ID: מזהה המיקום של מילון המונחים שמכיל את המונח הראשון.
  • ‫TERM1_GLOSSARY_ID: המזהה של מילון המונחים שמכיל את המונח הראשון.
  • ‫TERM1_ID: המזהה של המונח הראשון.
  • ‫TERM2_PROJECT_NUMBER: מספר הפרויקט של המונח השני שרוצים לקשר אליו כמונח נרדף. אם שני התנאים נמצאים באותו פרויקט, הערך הזה זהה למספר הפרויקט של התנאי הראשון.
  • ‫TERM2_LOCATION_ID: מזהה המיקום של מילון המונחים שמכיל את המונח השני. אם שני המונחים נמצאים באותו מיקום, הערך הזה זהה למזהה המיקום של המונח הראשון.
  • ‫TERM2_GLOSSARY_ID: המזהה של מילון המונחים שמכיל את המונח השני. אם שני המונחים נמצאים באותו מילון, הערך הזה זהה למזהה המילון של המונח הראשון.
  • ‫TERM2_ID: המזהה של המונח השני.
  • ‫ENTRY_LINK_ID: מזהה של הקישור בין שני המונחים. כל מונח מיוצג כרשומה ב-Knowledge Catalog. הקישור לערך הוא הקשר בין מילים נרדפות.

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

  2. מרחיבים את מילון המונחים ולוחצים על המונח שרוצים ליצור איתו קישורים.

  3. לוחצים על עריכה לצד מונחים קשורים.

  4. מחפשים את המונחים שרוצים לקשר אליהם ובוחרים אותם.

    המונח מקושר מיד כשבוחרים אותו.

  5. לוחצים על Close.

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X POST https://dataplex.googleapis.com/v1/projects/TERM1_PROJECT_ID/locations/TERM1_LOCATION_ID/entryGroups/@dataplex/entryLinks?entry_link_id=ENTRY_LINK_ID -d "$(cat<<EOF
{
  "entry_link_type": "projects/dataplex-types/locations/global/entryLinkTypes/related",
"entry_references": [{
     "name": "projects/TERM1_PROJECT_NUMBER/locations/TERM1_LOCATION_ID/entryGroups/@dataplex/entries/projects/TERM1_PROJECT_NUMBER/locations/TERM1_LOCATION_ID/glossaries/TERM1_GLOSSARY_ID/terms/TERM1_ID",
     "type": "UNSPECIFIED"
  }, {
     "name": "projects/TERM2_PROJECT_NUMBER/locations/TERM2_LOCATION_ID/entryGroups/@dataplex/entries/projects/TERM2_PROJECT_NUMBER/locations/TERM2_LOCATION_ID/glossaries/TERM2_GLOSSARY_ID/terms/TERM2_ID",
     "type": "UNSPECIFIED"
  }
  ]

}
EOF
)"

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

  • ‫TERM1_PROJECT_NUMBER: מספר הפרויקט של המונח הראשון שמקושר.
  • ‫TERM1_LOCATION_ID: מזהה המיקום של מילון המונחים שמכיל את המונח הראשון.
  • ‫TERM1_GLOSSARY_ID: המזהה של מילון המונחים שמכיל את המונח הראשון.
  • ‫TERM1_ID: המזהה של המונח הראשון.
  • ‫TERM2_PROJECT_NUMBER: מספר הפרויקט של המונח השני שרוצים לקשר כמונח קשור. אם שני התנאים נמצאים באותו פרויקט, הערך הזה זהה למספר הפרויקט של התנאי הראשון.
  • ‫TERM2_LOCATION_ID: מזהה המיקום של מילון המונחים שמכיל את המונח השני. אם שני המונחים נמצאים באותו מיקום, הערך הזה זהה למזהה המיקום של המונח הראשון.
  • ‫TERM2_GLOSSARY_ID: המזהה של מילון המונחים שמכיל את המונח השני. אם שני המונחים נמצאים באותו מילון, הערך הזה זהה למזהה המילון של המונח הראשון.
  • ‫TERM2_ID: המזהה של המונח השני.
  • ‫ENTRY_LINK_ID: מזהה של הקישור בין שני המונחים. כל מונח מיוצג כרשומה ב-Knowledge Catalog. הקישור לערך הוא הקשר בין מונחים קשורים.

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X POST https://dataplex.googleapis.com/v1/projects/TERM_PROJECT_ID/locations/SYNONYM_LINKS_LOCATION_ID:lookupEntryLinks?entry=projects/TERM_PROJECT_NUMBER/locations/TERM_LOCATION_ID/entryGroups/@dataplex/entries/projects/TERM_PROJECT_NUMBER/locations/TERM_LOCATION_ID/glossaries/TERM_GLOSSARY_ID/terms/TERM_ID&entry_link_types=projects/dataplex-types/locations/global/entryLinkTypes/synonym&page_size=10

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

  • ‫TERM_PROJECT_ID: מזהה הפרויקט של המונח שאתם מחפשים את הקישורים למילים הנרדפות שלו.
  • ‫TERM_PROJECT_NUMBER: מספר הפרויקט של המונח שאתם מחפשים את הקישורים למילים הנרדפות שלו.
  • ‫SYNONYM_LINKS_LOCATION_ID: מזהה המיקום שבו אתם מחפשים את הקישורים למילים הנרדפות.
  • ‫TERM_LOCATION_ID: מזהה המיקום של המונח.
  • ‫TERM_GLOSSARY_ID: המזהה של מילון המונחים שמכיל את המונח.
  • ‫TERM_ID: מזהה המונח.

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X POST https://dataplex.googleapis.com/v1/projects/TERM_PROJECT_ID/locations/RELATED_LINKS_LOCATION_ID:lookupEntryLinks?entry=projects/TERM_PROJECT_NUMBER/locations/TERM_LOCATION_ID/entryGroups/@dataplex/entries/projects/TERM_PROJECT_NUMBER/locations/TERM_LOCATION_ID/glossaries/TERM_GLOSSARY_ID/terms/TERM_ID&entry_link_types=projects/dataplex-types/locations/global/entryLinkTypes/related&page_size=10

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

  • ‫TERM_PROJECT_ID: מזהה הפרויקט של המונח שאתם מחפשים את הקישורים שקשורים אליו.
  • ‫TERM_PROJECT_NUMBER: מספר הפרויקט של המונח שאתם מחפשים את הקישורים הרלוונטיים שלו.
  • ‫RELATED_LINKS_LOCATION_ID: מזהה המיקום שבו אתם מחפשים את הקישורים הרלוונטיים.
  • ‫TERM_LOCATION_ID: מזהה המיקום של המונח.
  • ‫TERM_GLOSSARY_ID: המזהה של מילון המונחים שמכיל את המונח.
  • ‫TERM_ID: מזהה המונח.

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

  2. מרחיבים את מילון המונחים ולוחצים על המונח שרוצים להסיר את המילים הנרדפות או המונחים הקשורים שלו.

  3. כדי למחוק קישורים בין מונחים קשורים, לוחצים על עריכה לצד מונחים קשורים. מוחקים את המונחים הקשורים ולוחצים על סגירה.

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

REST

  1. מחפשים את הקישורים לרשומות כדי למצוא את מזהה הקישור לרשומה שרוצים למחוק. מידע נוסף זמין במאמרים חיפוש קישורים למילים נרדפות של מונח או חיפוש קישורים קשורים למונח.

  2. כדי למחוק את הקישור, שולחים את בקשת ה-DELETE הבאה:

    alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'
    
    gcurl -X DELETE https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/entryGroups/ENTRY_GROUP_ID/entryLinks/ENTRY_LINK_ID

אפשר לצרף מונחים לנכסי נתונים או לעמודות של נכסי נתונים. לדוגמה, אתם יכולים לצרף מונחים למערכי נתונים ב-BigQuery ולטבלאות של Iceberg REST Catalog.

המסוף

  1. נכנסים לדף Search של Knowledge Catalog במסוף Google Cloud .

    מעבר לחיפוש

  2. מחפשים את נכס הנתונים (למשל, מערך נתונים, קובץ או טבלה) שרוצים לקשר אליו מונח, ולוחצים עליו.

  3. בדף של נכס הנתונים, מבצעים אחת מהפעולות הבאות:

    • כדי לקשר מונחים לנכס, בכרטיסייה Details, בקטע Glossary terms, לוחצים על Add. מחפשים את המונחים, בוחרים אותם ולוחצים על סגירה.
    • אם לנכס יש סכימה, אפשר לקשר מונחים לעמודה. בכרטיסייה Schema, בוחרים עמודה כדי לקשר אליה מונחים ולוחצים על Add business term. מחפשים את המונחים, בוחרים אותם ולוחצים על סגירה.

Python

from google.cloud import dataplex_v1

def attach_term_to_asset(
    project_id: str,
    location: str,
    entry_group_id: str,
    entry_link_id: str,
    source_entry_name: str,
    target_term_name: str,
) -> dataplex_v1.EntryLink:
    """Creates an entry link attaching a glossary term to a data asset."""
    client = dataplex_v1.CatalogServiceClient()
    parent_group = (
        f"projects/{project_id}/locations/{location}/"
        f"entryGroups/{entry_group_id}"
    )

    entry_link = dataplex_v1.EntryLink(
        entry_link_type=(
            "projects/dataplex-types/locations/global/"
            "entryLinkTypes/definition"
        ),
        entry_references=[
            dataplex_v1.EntryLink.EntryReference(
                name=source_entry_name, type_="SOURCE"
            ),
            dataplex_v1.EntryLink.EntryReference(
                name=target_term_name, type_="TARGET"
            ),
        ],
    )

    return client.create_entry_link(
        parent=parent_group,
        entry_link_id=entry_link_id,
        entry_link=entry_link,
    )

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X POST https://dataplex.googleapis.com/v1/projects/PROJECT_NUMBER/locations/ENTRY_LOCATION_ID/entryGroups/ENTRY_GROUP_ID/entryLinks?entry_link_id=ENTRY_LINK_ID -d "$(cat<<EOF
{
  "entry_link_type": "projects/dataplex-types/locations/global/entryLinkTypes/definition",
  "entry_references": [{
     "name": "projects/PROJECT_NUMBER/locations/ENTRY_LOCATION_ID/entryGroups/ENTRY_GROUP_ID/entries/ENTRY_ID",
     "type": "SOURCE"
  }, {
     "name": "projects/TERM_PROJECT_NUMBER/locations/TERM_LOCATION_ID/entryGroups/@dataplex/entries/projects/TERM_PROJECT_NUMBER/locations/TERM_LOCATION_ID/glossaries/TERM_GLOSSARY_ID/terms/TERM_ID",
     "type": "TARGET"
  }
  ]
}
EOF
)"

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

  • PROJECT_NUMBER: מספר הפרויקט של נכס הנתונים שמקושר
  • ‫ENTRY_LOCATION_ID: מזהה המיקום של נכס הנתונים שמקושר
  • ENTRY_GROUP_ID: קבוצת הרשומות של נכס הנתונים שמקושרת
  • ENTRY_LINK_ID: מזהה לקישור בין המונח לבין הרשומה ב-Knowledge Catalog שמייצגת את נכס הנתונים.
  • ‫TERM_PROJECT_NUMBER: מספר הפרויקט של המונח שמקושר.

צירוף מונחים לעמודה בסכימת רשומה

המסוף

  1. נכנסים לדף Search של Knowledge Catalog במסוף Google Cloud .

    מעבר לחיפוש

  2. מחפשים את נכס הנתונים (כמו קבוצת נתונים, קובץ או טבלה) שיש לו סכימה עם עמודה שרוצים לקשר אליה מונח. לוחצים על נכס הנתונים.

  3. בדף של נכס הנתונים, מבצעים אחת מהפעולות הבאות:

    • כדי לקשר מונחים לעמודה בנכס הנתונים, בכרטיסייה Schema בוחרים את העמודות שרוצים לצרף אליהן את המונח.
    • לוחצים על הוספת מונח עסקי. מחפשים את המונח שרוצים לצרף ולוחצים עליו.

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X POST https://dataplex.googleapis.com/v1/projects/PROJECT_NUMBER/locations/ENTRY_LOCATION_ID/entryGroups/ENTRY_GROUP_ID/entryLinks?entry_link_id=ENTRY_LINK_ID -d "$(cat<<EOF
{
 "entry_link_type": "projects/dataplex-types/locations/global/entryLinkTypes/definition",
 "entry_references": [
   {
     "name": "projects/PROJECT_NUMBER/locations/ENTRY_LOCATION_ID/entryGroups/ENTRY_GROUP_ID/entries/ENTRY_ID",
     "path": "Schema.COLUMN_NAME",
     "type": "SOURCE"
   },
   {
     "name": "projects/TERM_PROJECT_NUMBER/locations/TERM_LOCATION_ID/entryGroups/@dataplex/entries/projects/TERM_PROJECT_NUMBER/locations/TERM_LOCATION_ID/glossaries/TERM_GLOSSARY_ID/terms/TERM_ID",
     "type": "TARGET"
   }
 ]
}
EOF
)"

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

  • ‫PROJECT_NUMBER: מספר הפרויקט של נכס הנתונים שמקושר
  • ‫ENTRY_LOCATION_ID: מזהה המיקום של נכס הנתונים שמקושר
  • ENTRY_GROUP_ID: קבוצת הרשומות של נכס הנתונים שמקושרת
  • ‫ENTRY_LINK_ID: מזהה לקישור בין המונח לבין הרשומה ב-Knowledge Catalog שמייצגת את נכס הנתונים
  • ‫TERM_PROJECT_NUMBER: מספר הפרויקט של המונח שמקושר
  • ‫COLUMN_NAME: העמודה שאליה רוצים לצרף את המונח

צירוף מונח לכמה נכסי נתונים או עמודות

אפשר לצרף מונח אחד ממילון המונחים לכמה נכסי נתונים או עמודות בו-זמנית. אפשר לבחור עד 20 משאבים או עמודות בפעולה אחת.

המסוף

כדי לצרף מונח לכמה משאבים:

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

  2. ברשימה Glossaries, מרחיבים את מילון המונחים שמכיל את המונח שרוצים לקשר.

  3. לוחצים על המונח.

  4. בקטע Related entries, לוחצים על Add.

  5. בתיבת הדו-שיח Attach related entries, מבצעים את הפעולות הבאות:

    1. מוצאים את המשאבים או העמודות שרוצים לקשר. כדי לצמצם את תוצאות החיפוש, אפשר להשתמש ב-Filter כדי לחפש לפי שם המשאב, סוג המשאב או שם העמודה.

      לדוגמה, כדי למצוא עמודה בשם sample-column בטבלה ב-BigQuery בשם sample-table בפרויקט עם המזהה sample-project, משתמשים בשאילתה הבאה:

      project id:sample-project
      Resource Name:sample-table
      Column Name:sample-column
      

      אפשר להזין מחרוזות חלקיות כדי למצוא נכסים תואמים.

    2. בוחרים את נכסי הנתונים והעמודות שרוצים לצרף.

    3. כדי לבדוק את הבחירות לפני ההוספה, לוחצים על המתג Show selected resources.

    4. לוחצים על הוספה.

  6. כדי לוודא שהמשאבים והעמודות החדשים צורפו, עוברים לקטע Related entries בדף הפרטים של המונח.

חיפוש נכסי נתונים שמקושרים למונח

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X POST https://dataplex.googleapis.com/v1/projects/TERM_PROJECT_ID/locations/DEFINITION_LINKS_LOCATION_ID:lookupEntryLinks?entry=projects/TERM_PROJECT_NUMBER/locations/TERM_LOCATION_ID/entryGroups/@dataplex/entries/projects/TERM_PROJECT_NUMBER/locations/TERM_LOCATION_ID/glossaries/TERM_GLOSSARY_ID/terms/TERM_ID&entry_link_types=projects/dataplex-types/locations/global/entryLinkTypes/definition&entry_mode=TARGET&page_size=10

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

  • ‫TERM_PROJECT_ID: מזהה הפרויקט של המונח שאתם מחפשים את הקישורים להגדרות שלו.
  • ‫TERM_PROJECT_NUMBER: מספר הפרויקט של המונח שאתם מחפשים את הקישורים להגדרה שלו.
  • ‫DEFINITION_LINKS_LOCATION_ID: מזהה המיקום שבו אתם מחפשים את הקישורים להגדרות.
  • ‫TERM_LOCATION_ID: מזהה המיקום של המונח.
  • ‫TERM_GLOSSARY_ID: המזהה של מילון המונחים שמכיל את המונח.
  • ‫TERM_ID: מזהה המונח.

חיפוש מונחים שמקושרים לנכס נתונים

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X POST https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/DEFINITION_LINKS_LOCATION_ID:lookupEntryLinks?entry=projects/PROJECT_NUMBER/locations/ENTRY_LOCATION_ID/entryGroups/ENTRY_GROUP_ID/entries/ENTRY_ID&entry_link_types=projects/dataplex-types/locations/global/entryLinkTypes/definition&entry_mode=SOURCE&page_size=10

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

  • ‫PROJECT_ID: מזהה הפרויקט של נכס הנתונים שאתם מחפשים את הקישורים להגדרות שלו.
  • ‫PROJECT_NUMBER: מספר הפרויקט של נכס הנתונים שאתם מחפשים את הקישורים להגדרות שלו.
  • ‫DEFINITION_LINKS_LOCATION_ID: מזהה המיקום שבו אתם מחפשים את הקישורים להגדרות.
  • ‫ENTRY_LOCATION_ID: מזהה המיקום של נכס הנתונים.
  • ‫ENTRY_GROUP_ID: המזהה של קבוצת הרשומות של נכס הנתונים.
  • ‫ENTRY_ID: המזהה של נכס הנתונים.

המסוף

  1. נכנסים לדף Search של Knowledge Catalog במסוף Google Cloud .

    מעבר לחיפוש

  2. מחפשים את נכס הנתונים (כמו מערך נתונים, קובץ או טבלה) שרוצים להסיר ממנו את המונחים ולוחצים עליו.

  3. בדף של נכס הנתונים, מבצעים אחת מהפעולות הבאות:

    • כדי להסיר מונח מנכס, בכרטיסייה Details, בקטע Glossary terms, לוחצים על המונח. ואז לוחצים על .
    • כדי להסיר מונח מעמודה, בכרטיסייה Schema לוחצים על לצד המונח.

REST

alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'

gcurl -X DELETE https://dataplex.googleapis.com/v1/projects/ENTRY_PROJECT_ID/locations/ENTRY_LOCATION_ID/entryGroups/ENTRY_GROUP_ID/entryLinks/ENTRY_LINK_ID

חיפוש מילוני מונחים, מונחים ונכסי נתונים מקושרים

המסוף

כדי לנווט בתוכן של מילון המונחים הארגוני, משתמשים בעץ המונחים והמילונים שבדף Glossaries.

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

  2. בדף Glossaries, משתמשים בסרגל הסינון כדי למצוא קטגוריות. אפשר להשתמש במסננים הבאים:

    • Name: מחזיר את מילוני המונחים, הקטגוריות והמונחים שהשם שלהם מכיל את הטקסט שציינתם.
    • Parent: מחזיר את המונחים שהשם או התיאור של מילון המונחים הראשי שלהם תואם לטקסט שאתם מספקים. לדוגמה, parent:Finance מחזיר את המונחים שמקושרים למילון הראשי שהשם או התיאור שלו מכילים את הביטוי Finance.
    • Synonym: מחזירה את רשימת המונחים עם מילה נרדפת שהשם או המזהה שלה מכילים את הטקסט שאתם מספקים. לדוגמה, synonym:Profit מחזיר את המונחים שיש להם מונח נרדף שהשם או המזהה שלו מכילים את הביטוי profit.
    • Contact: מחזירה את המונחים שבהם מנהל מדיניות המידע הארגונית רשום כאיש קשר. לדוגמה, contact:alex@example.com מחזיר את הרשומות שמקושרות למונחים עם מנהל מידע ארגוני שתואם ל-alex@example.com.

REST

כדי למצוא מילוני מונחים, מונחים ונכסי נתונים מקושרים באמצעות ה-API בארכיטקטורת REST, צריך להירשם לגרסת טרום-השקה (Preview).

חיפוש נכסי נתונים שמקושרים למונחים

המסוף

  1. נכנסים לדף Glossaries של Knowledge Catalog במסוף Google Cloud .

    כניסה לדף Glossaries

  2. בדף Glossaries, משתמשים בסרגל הסינון כדי להזין שאילתת חיפוש בטקסט חופשי. הפעולה הזו מחזירה רשימה של התאמות תואמות בשמות של מילון המונחים, הקטגוריה והמונח.

  3. לוחצים על מונח תואם.

  4. בדף Term details, אפשר לראות את המונחים המקושרים (מילים נרדפות ומונחים קשורים) ואת הרשומות המקושרות (נכסי נתונים) למונח הזה.

  5. כדי לראות את הפרטים של רשומה ב-Knowledge Catalog, לוחצים על הרשומה.

REST

כדי למצוא מילוני מונחים, מונחים ונכסי נתונים מקושרים באמצעות ה-API בארכיטקטורת REST, צריך להירשם לגרסת טרום-השקה (Preview).

לייבא מילוני מונחים וקישורים בין מונחים למונחים או לנכסי נתונים

כדי לייבא מילונים וקישורים מכלי אחר ליצירת קטלוגים או כדי לעדכן את המילונים ב-Knowledge Catalog, אתם יכולים לייבא בכמות גדולה מילונים, קטגוריות, מונחים, קישורים בין מונחים, קישורים בין מונחים לנכסי נתונים או עמודות, באמצעות ה-API בארכיטקטורת REST.

  1. יוצרים את מילון המונחים של היעד.

    REST

    alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'
    
    gcurl -X POST https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/glossaries?glossary_id=GLOSSARY_ID -d "$(cat<<EOF
    
    {
     "displayName": "DISPLAY_NAME",
     "description": "DESCRIPTION"
    }
    EOF
    )"

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

    • ‫PROJECT_ID: מזהה הפרויקט שבו יוצרים את מילון המונחים
    • ‫LOCATION_ID: המיקום שבו רוצים ליצור את מילון המונחים
    • ‫GLOSSARY_ID: מזהה מילון המונחים
    • ‫DISPLAY_NAME: השם המוצג של מילון המונחים
    • ‫DESCRIPTION: תיאור מילון המונחים
  2. כדי לייבא קטגוריות, מונחים וקישורים בין מונחים לנכסי נתונים במילון המונחים שנוצר, מעלים קבצים של כל אחד מהם לקטגוריה של Cloud Storage. הקבצים האלה הם בפורמט הבא:

    • פורמט לדוגמה של מונחים וקטגוריות במילון מונחים

       {"entry":{"name":"projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/categories/CATEGORY_ID","entryType":"projects/dataplex-types/locations/global/entryTypes/glossary-category","aspects":{"dataplex-types.global.glossary-category-aspect":{"data":{}},"dataplex-types.global.overview":{"data":{"content":"CONTENT"}},"dataplex-types.global.contacts":{"data":{"identities":[{role: "steward", name: "CONTACT_DISPLAY_NAME", id: "CONTACT_EMAIL"}]}}},"parentEntry":"projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID","entrySource":{"resource":"projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/categories/CATEGORY_ID","displayName":"CATEGORY_NAME","description":"CATEGORY_DESCRIPTION","ancestors":[{"name":"projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID","type":"projects/dataplex-types/locations/global/entryTypes/glossary"}]}}}
       {"entry":{"name":"projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms/TERM1_ID","entryType":"projects/dataplex-types/locations/global/entryTypes/glossary-term","aspects":{"dataplex-types.global.glossary-term-aspect":{"data":{}},"dataplex-types.global.overview":{"data":{"content":"TERM1_CONTENT"}},"dataplex-types.global.contacts":{"data":{"identities":[{role: "steward", name: "CONTACT_DISPLAY_NAME", id: "CONTACT_EMAIL"}]}}},"parentEntry":"projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID","entrySource":{"resource":"projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms/TERM1_ID","displayName":"TERM1_DISPLAY_NAME","description":"TERM1_DESCRIPTION","ancestors":[{"name":"projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID","type":"projects/dataplex-types/locations/global/entryTypes/glossary"},{"name":"projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/categories/CATEGORY_ID","type":"projects/dataplex-types/locations/global/entryTypes/glossary-category"}]}}}
       {"entry":{"name":"projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms/TERM2_ID","entryType":"projects/dataplex-types/locations/global/entryTypes/glossary-term","aspects":{"dataplex-types.global.glossary-term-aspect":{"data":{}},"dataplex-types.global.overview":{"data":{"content":"TERM1_CONTENT"}},"dataplex-types.global.contacts":{"data":{"identities":[{role: "steward", name: "CONTACT_DISPLAY_NAME", id: "CONTACT_EMAIL"}]}}},"parentEntry":"projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID","entrySource":{"resource":"projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/terms/TERM2_ID","displayName":"TERM2_DISPLAY_NAME","description":"TERM2_DESCRIPTION","ancestors":[{"name":"projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID","type":"projects/dataplex-types/locations/global/entryTypes/glossary"},{"name":"projects/PROJECT_NUMBER/locations/LOCATION_ID/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/LOCATION_ID/glossaries/GLOSSARY_ID/categories/CATEGORY_ID","type":"projects/dataplex-types/locations/global/entryTypes/glossary-category"}]}}}
       
    • פורמט לדוגמה של קישורים בין מונחים

       {"entryLink":{"name":"projects/PROJECT_NUMBER/locations/global/entryGroups/@dataplex/entryLinks/el-import-0606e3f2-8206-4f3a-aba9-32c6196f6048","entryLinkType":"projects/dataplex-types/locations/global/entryLinkTypes/synonym","entryReferences":[{"name":"projects/PROJECT_NUMBER/locations/global/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/global/glossaries/import-glossary/terms/term-1"},{"name":"projects/PROJECT_NUMBER/locations/global/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/global/glossaries/import-glossary/terms/term-2"}]}}
       {"entryLink":{"name":"projects/PROJECT_NUMBER/locations/global/entryGroups/@dataplex/entryLinks/el-import-2f7408e3-af3d-405d-81bb-861cf9ec5146","entryLinkType":"projects/dataplex-types/locations/global/entryLinkTypes/related","entryReferences":[{"name":"projects/PROJECT_NUMBER/locations/global/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/global/glossaries/import-glossary/terms/term-1"},{"name":"projects/PROJECT_NUMBER/locations/global/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/global/glossaries/import-glossary/terms/term-2"}]}}
       
    • פורמט לדוגמה של קישורים בין מונחים לנכסי נתונים

       projects/PROJECT_NUMBER/locations/us-central1/entryGroups/entry-group-1/entries/entry-1 and term projects/PROJECT_NUMBER/locations/global/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/global/glossaries/import-glossary/terms/term-1
       {"entryLink":{"name":"projects/PROJECT_NUMBER/locations/global/entryGroups/@dataplex/entryLinks/el-import-0606e3f2-8206-4f3a-aba9-32c6196f6048","entryLinkType":"projects/dataplex-types/locations/global/entryLinkTypes/definition","entryReferences":[{"name":"projects/PROJECT_NUMBER/locations/global/entryGroups/@dataplex/entries/projects/PROJECT_NUMBER/locations/global/glossaries/import-glossary/terms/term-1"},{"name":"projects/PROJECT_NUMBER/locations/us-central1/entryGroups/entry-group-1/entries/entry-1"}]}}
       
    # Set GCURL alias
    alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json"'
    
    gcurl https://DATAPLEX_API/metadataJobs?metadata_job_id=JOB_ID -d "$(cat<<EOF
    {
      "type":"IMPORT",
      "import_spec":{
         "log_level":"DEBUG",
         "source_storage_uri":"gs://STORAGE_BUCKET/",
         "entry_sync_mode":"FULL",
         "aspect_sync_mode":"INCREMENTAL",
         "scope":{
            "glossaries": "GLOSSARY_NAME"
         }
      }
    }
    EOF
    )"

    מחליפים את DATAPLEX_API בנקודת הקצה של Dataplex API בפורמט dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID.

  3. אופציונלי: בודקים את סטטוס הפעולה.

    gcurl https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/operations/operation-OPERATION_ID

    מחליפים את OPERATION_ID במזהה הפעולה.

  4. אופציונלי: בודקים את הסטטוס של משימת המטא-נתונים.

    gcurl -X GET https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/metadataJobs/JOB_ID
  5. ייבוא קישורים בין מונחים כמילים נרדפות או כמונחים קשורים.

    gcurl https://DATAPLEX_API/metadataJobs?metadata_job_id=JOB_ID -d "$(cat<<EOF
    {
      "type":"IMPORT",
      "import_spec":{
         "log_level":"DEBUG",
         "source_storage_uri":"gs://STORAGE_BUCKET/",
         "entry_sync_mode":"FULL",
         "aspect_sync_mode":"INCREMENTAL",
         "scope":{
            "entry_groups":[  "projects/PROJECT_ID/locations/LOCATION_ID/entryGroups/@dataplex"
            ],
            "entry_link_types":[
               "projects/dataplex-types/locations/global/entryLinkTypes/synonym",
               "projects/dataplex-types/locations/global/entryLinkTypes/related"
            ],
            "referenced_entry_scopes":[
               "PROJECT_IDS"
            ]
         }
      }
    }
    EOF
    )"

    מחליפים את DATAPLEX_API ב-dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID.

  6. לייבא קישורים בין מונחים לבין נכסי נתונים או עמודות.

    כדי ליצור קישור בין מונחים במילון המונחים לבין נכסי נתונים, מריצים את משימת הייבוא לכל קבוצת רשומות שאליה שייכת הרשומה של נכס הנתונים. כל הקישורים לרשומות של הגדרות נוצרים בקבוצת הרשומות הזו.

    gcurl https://DATAPLEX_API/metadataJobs?metadata_job_id=JOB_ID -d "$(cat<<EOF
    {
    "type":"IMPORT",
    "import_spec":{
      "log_level":"DEBUG",
      "source_storage_uri":"gs://STORAGE_BUCKET/",
      "entry_sync_mode":"FULL",
      "aspect_sync_mode":"INCREMENTAL",
      "scope":{
         "entry_groups":[  "projects/PROJECT_ID/locations/ENTRY_GROUP_LOCATION_ID/entryGroups/@dataplex"
         ],
         "entry_link_types":[
            "projects/dataplex-types/locations/global/entryLinkTypes/definition"
         ],
         "referenced_entry_scopes":[
            "PROJECT_IDS"
         ]
      }
    }
    }
    EOF
    )"

    מחליפים את DATAPLEX_API ב-dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID.

תמחור

החל מיולי 2025, החיוב על מילון המונחים הארגוני של Knowledge Catalog יהיה זהה לתמחור של אחסון המטא-נתונים. מחירי האחסון של מטא-נתונים ב-Knowledge Catalog

המאמרים הבאים