ניהול רשומות והוספת מקורות בהתאמה אישית

במאמר הזה מוסבר איך להעביר מידע על מקורות נתונים ייחודיים ומותאמים אישית אל Dataplex Universal Catalog.

‫Dataplex Universal Catalog משמש כמאגר מרכזי לכל נכסי הנתונים שלכם. כדי לשלב מקור מותאם אישית, צריך שלושה רכיבים עיקריים:

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

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

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

תהליך השילוב

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

  1. יוצרים קבוצת רשומות (התיקייה).

  2. מגדירים סוג רשומה (התבנית או הסכימה).

  3. יוצרים את הרשומה המותאמת אישית (רשומת הנתונים) באמצעות התבנית בתיקייה.

דפים

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

קטגוריות של רשומות

  • רשומות מערכת: Dataplex Universal Catalog יוצר רשומות עבור משאבים, כמו מערכי נתונים או טבלאות של BigQuery. Google Cloudהערכים שנוצרים ב-Dataplex Universal Catalog נקראים ערכי מערכת. ב-Dataplex Universal Catalog, הרשומות במערכת מתעדכנות באופן אוטומטי באמצעות סנכרון רציף של מטא-נתונים מהמערכות הנתמכות Google Cloud .

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

  • רשומות בהתאמה אישית: רשומות שאפשר ליצור ולנהל עבור משאבים בהתאמה אישית נקראות רשומות בהתאמה אישית. משאבים בהתאמה אישית הם משאבים בשירותים שלא שייכים ל-Google, שמתארחים ב- Google Cloud או באופן חיצוני (למשל, בשרתים מקומיים).

קבוצות של רשומות

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

קטגוריות של קבוצות ערכים

  • קבוצות של רשומות במערכת: עבור משאבי Google Cloud , Dataplex Universal Catalog יוצר באופן אוטומטי קבוצות של רשומות לכל מערכת בכל פרויקט ובכל מיקום שבו נמצאים המשאבים. לדוגמה, @bigquery היא קבוצת רשומות המערכת של BigQuery.

  • קבוצות כניסה בהתאמה אישית: קבוצות כניסה שאתם יוצרים עבור משאבים בהתאמה אישית.

סוגי רשומות

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

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

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

קטגוריות של סוגי רשומות

  • סוגי רשומות בהתאמה אישית: סוגי רשומות שאתם יוצרים ומנהלים. אפשר להשתמש בסוגי הרשומות האלה כדי ליצור רשומות מותאמות אישית.

  • סוגי רשומות במערכת: Dataplex Universal Catalog מספק את סוגי הרשומות האלה כברירת מחדל. סוגי הרשומות במערכת מסווגים גם כסוגים שאפשר לעשות בהם שימוש חוזר וכסוגים מוגבלים.

    בטבלה הבאה מתוארות הקטגוריות של סוגי רשומות המערכת, ורשימת סוגי הרשומות ש-Dataplex Universal Catalog מספק לכל אחת מהקטגוריות:

    קטגוריה של סוג רשומה במערכת תיאור סוגי הרשומות ש-Dataplex Universal Catalog מספק
    סוג רשומה של מערכת לשימוש חוזר אתם יכולים להשתמש בסוג הרשומה הזה כדי ליצור רשומות מותאמות אישית.
    • generic
    סוג רשומה של מערכת מוגבלת הם שמורים לשימוש המערכת, למשל ליצירת רשומות של משאביGoogle Cloud .

    אי אפשר להשתמש בסוגי הרשומות האלה כדי ליצור רשומות, אבל אפשר לערוך רשומות מסוגים כאלה כדי להוסיף היבטים אופציונליים.
    כולל, בין היתר:
    • analytics-hub-exchange
    • analytics-hub-listing
    • aspecttype
    • bigquery-dataset
    • bigquery-table
    • cloudsql-database
    • cloudsql-instance
    • cloudsql-table
    • entrygroup
    • entrytype
    • sql-access
    • storage
    • storage-bucket
    • storage-folder

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

סוגי רשומות של מערכת הם תמיד גלובליים. סוגי הרשומות של המערכת מאוחסנים בפרויקט שמנוהל על ידי Google עם מזהה הפרויקט 655216118709. לדוגמה, projects/655216118709/locations/global/entryTypes/bigquery-table.

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

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

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

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

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

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

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

הפעלת ה-API

מפעילים את Dataplex API בפרויקט Dataplex Universal Catalog. אם אתם משתמשים ב Google Cloud פרויקט חדש או בפרויקט שבו BigQuery API מופעל, Dataplex API מופעל כברירת מחדל.

הפעלה של ה-API

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

המסוף

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

    מעבר אל קטלוג

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

  3. לוחצים על יצירת קבוצת רשומות (Dataplex Universal Catalog).

  4. בחלון Create entry group, מזינים את הפרטים הבאים:

    1. אופציונלי: בשדה השם המוצג, מזינים שם מוצג לקבוצת הרשומות.
    2. מזהה קבוצת רשומות: מזינים מזהה ייחודי לקבוצת הרשומות.
    3. אופציונלי: בשדה Description מזינים תיאור לקבוצת הרשומות.
    4. מיקום: בוחרים מיקום. אי אפשר לשנות את המיקום אחרי שיוצרים את קבוצת הרשומות.
  5. אופציונלי: בקטע Labels (תוויות), מוסיפים תוויות שרירותיות כצמדי מפתח/ערך למשאבים:

    1. לוחצים על הוספת תווית.
    2. בשדה Key (מפתח), מזינים מפתח.
    3. בשדה ערך, מזינים ערך למפתח.
    4. כדי להוסיף עוד תוויות, לוחצים על הוספת תווית וחוזרים על השלבים.
  6. לוחצים על Save.

gcloud

כדי ליצור קבוצת רשומות, משתמשים בפקודה gcloud dataplex entry-groups create.

C#‎

C#

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

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

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

public sealed partial class GeneratedCatalogServiceClientSnippets
{
    /// <summary>Snippet for CreateEntryGroup</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 CreateEntryGroupRequestObject()
    {
        // Create client
        CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
        // Initialize request argument(s)
        CreateEntryGroupRequest request = new CreateEntryGroupRequest
        {
            ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
            EntryGroupId = "",
            EntryGroup = new EntryGroup(),
            ValidateOnly = false,
        };
        // Make the request
        Operation<EntryGroup, OperationMetadata> response = catalogServiceClient.CreateEntryGroup(request);

        // Poll until the returned long-running operation is complete
        Operation<EntryGroup, OperationMetadata> completedResponse = response.PollUntilCompleted();
        // Retrieve the operation result
        EntryGroup 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<EntryGroup, OperationMetadata> retrievedResponse = catalogServiceClient.PollOnceCreateEntryGroup(operationName);
        // Check if the retrieved long-running operation has completed
        if (retrievedResponse.IsCompleted)
        {
            // If it has completed, then access the result
            EntryGroup retrievedResult = retrievedResponse.Result;
        }
    }
}

Go

Go

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

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


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.NewCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &dataplexpb.CreateEntryGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/dataplex/apiv1/dataplexpb#CreateEntryGroupRequest.
	}
	op, err := c.CreateEntryGroup(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במדריך למתחילים בנושא Dataplex Universal Catalog באמצעות ספריות לקוח. מידע נוסף מופיע במאמרי העזרה של Dataplex Universal Catalog Java API.

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

import com.google.cloud.dataplex.v1.CatalogServiceClient;
import com.google.cloud.dataplex.v1.CreateEntryGroupRequest;
import com.google.cloud.dataplex.v1.EntryGroup;
import com.google.cloud.dataplex.v1.LocationName;

public class SyncCreateEntryGroup {

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

  public static void syncCreateEntryGroup() 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 (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
      CreateEntryGroupRequest request =
          CreateEntryGroupRequest.newBuilder()
              .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
              .setEntryGroupId("entryGroupId1228924712")
              .setEntryGroup(EntryGroup.newBuilder().build())
              .setValidateOnly(true)
              .build();
      EntryGroup response = catalogServiceClient.createEntryGroupAsync(request).get();
    }
  }
}

Python

Python

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

כדי לבצע אימות ב-Dataplex Universal 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_entry_group():
    # Create a client
    client = dataplex_v1.CatalogServiceClient()

    # Initialize request argument(s)
    request = dataplex_v1.CreateEntryGroupRequest(
        parent="parent_value",
        entry_group_id="entry_group_id_value",
    )

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

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

    response = operation.result()

    # Handle the response
    print(response)

Ruby

Ruby

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

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

require "google/cloud/dataplex/v1"

##
# Snippet for the create_entry_group call in the CatalogService 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::CatalogService::Client#create_entry_group.
#
def create_entry_group
  # Create a client object. The client can be reused for multiple calls.
  client = Google::Cloud::Dataplex::V1::CatalogService::Client.new

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

  # Call the create_entry_group method.
  result = client.create_entry_group 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

כדי ליצור קבוצת רשומות, משתמשים בשיטה entryGroups.Create.

יצירת סוג רשומה

כדי להוסיף מקור חדש, צריך ליצור סוג רשומה.

המסוף

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

    מעבר אל קטלוג

  2. לוחצים על הכרטיסייה סוגי רשומות > מותאם אישית.

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

  4. בחלון Create entry type (יצירת סוג רשומה), מזינים את הפרטים הבאים:

    1. אופציונלי: בשדה השם המוצג, מזינים שם מוצג לסוג הרשומה.
    2. Entry type ID (מזהה סוג הרשומה): מזינים מזהה ייחודי לסוג הרשומה. אי אפשר לשנות את זה אחרי שיוצרים את סוג הרשומה.
    3. אופציונלי: בשדה Description (תיאור), מזינים תיאור לסוג הרשומה.
    4. אופציונלי: בשדה System (מערכת), מזינים את מערכת המקור.
    5. אופציונלי: בשדה Platform, מזינים את הפלטפורמה שאליה שייכים הערכים מהסוג הזה. לדוגמה, Google Cloud.
    6. בשדה מיקום, בוחרים מיקום. אי אפשר לשנות את המיקום אחרי שיוצרים את סוג הרשומה.
  5. אופציונלי: בקטע Type aliases (כינויי סוגים), מגדירים את סוג הנתונים של סוג הרשומה. אפשר להשתמש בסוג הנתונים הזה כדי לשלוח שאילתות לגבי רשומות.

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

    1. לוחצים על בחירת סוג יחס הגובה-רוחב.
    2. בחלון בחירת סוגי היבטים, בוחרים את סוג ההיבט.
    3. לוחצים על בחירה.

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

  7. אופציונלי: בקטע Labels (תוויות), מוסיפים תוויות שרירותיות כצמדי מפתח/ערך למשאבים:

    1. לוחצים על הוספת תווית.
    2. בשדה Key (מפתח), מזינים מפתח.
    3. בשדה ערך, מזינים ערך למפתח.
    4. כדי להוסיף עוד תוויות, לוחצים על הוספת תווית וחוזרים על השלבים.
  8. לוחצים על Save.

gcloud

כדי ליצור סוג רשומה, משתמשים בפקודה gcloud dataplex entry-types create.

C#‎

C#

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

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

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

public sealed partial class GeneratedCatalogServiceClientSnippets
{
    /// <summary>Snippet for CreateEntryType</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 CreateEntryTypeRequestObject()
    {
        // Create client
        CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
        // Initialize request argument(s)
        CreateEntryTypeRequest request = new CreateEntryTypeRequest
        {
            ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
            EntryTypeId = "",
            EntryType = new EntryType(),
            ValidateOnly = false,
        };
        // Make the request
        Operation<EntryType, OperationMetadata> response = catalogServiceClient.CreateEntryType(request);

        // Poll until the returned long-running operation is complete
        Operation<EntryType, OperationMetadata> completedResponse = response.PollUntilCompleted();
        // Retrieve the operation result
        EntryType 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<EntryType, OperationMetadata> retrievedResponse = catalogServiceClient.PollOnceCreateEntryType(operationName);
        // Check if the retrieved long-running operation has completed
        if (retrievedResponse.IsCompleted)
        {
            // If it has completed, then access the result
            EntryType retrievedResult = retrievedResponse.Result;
        }
    }
}

Go

Go

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

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


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.NewCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &dataplexpb.CreateEntryTypeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/dataplex/apiv1/dataplexpb#CreateEntryTypeRequest.
	}
	op, err := c.CreateEntryType(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במדריך למתחילים בנושא Dataplex Universal Catalog באמצעות ספריות לקוח. מידע נוסף מופיע במאמרי העזרה של Dataplex Universal Catalog Java API.

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

import com.google.cloud.dataplex.v1.CatalogServiceClient;
import com.google.cloud.dataplex.v1.CreateEntryTypeRequest;
import com.google.cloud.dataplex.v1.EntryType;
import com.google.cloud.dataplex.v1.LocationName;

public class SyncCreateEntryType {

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

  public static void syncCreateEntryType() 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 (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
      CreateEntryTypeRequest request =
          CreateEntryTypeRequest.newBuilder()
              .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
              .setEntryTypeId("entryTypeId-1105721081")
              .setEntryType(EntryType.newBuilder().build())
              .setValidateOnly(true)
              .build();
      EntryType response = catalogServiceClient.createEntryTypeAsync(request).get();
    }
  }
}

Python

Python

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

כדי לבצע אימות ב-Dataplex Universal 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_entry_type():
    # Create a client
    client = dataplex_v1.CatalogServiceClient()

    # Initialize request argument(s)
    request = dataplex_v1.CreateEntryTypeRequest(
        parent="parent_value",
        entry_type_id="entry_type_id_value",
    )

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

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

    response = operation.result()

    # Handle the response
    print(response)

Ruby

Ruby

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

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

require "google/cloud/dataplex/v1"

##
# Snippet for the create_entry_type call in the CatalogService 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::CatalogService::Client#create_entry_type.
#
def create_entry_type
  # Create a client object. The client can be reused for multiple calls.
  client = Google::Cloud::Dataplex::V1::CatalogService::Client.new

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

  # Call the create_entry_type method.
  result = client.create_entry_type 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

כדי ליצור סוג רשומה, משתמשים ב-method‏ entryTypes.create.

יצירת רשומה בהתאמה אישית

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

המסוף

אי אפשר ליצור רשומה בהתאמה אישית באמצעות Google Cloud המסוף. במקום זאת, אפשר להשתמש ב-Google Cloud CLI או ב-API.

gcloud

כדי ליצור רשומה בהתאמה אישית, משתמשים בפקודה gcloud dataplex entries create.

C#‎

C#

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

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

using Google.Cloud.Dataplex.V1;

public sealed partial class GeneratedCatalogServiceClientSnippets
{
    /// <summary>Snippet for CreateEntry</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 CreateEntryRequestObject()
    {
        // Create client
        CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
        // Initialize request argument(s)
        CreateEntryRequest request = new CreateEntryRequest
        {
            ParentAsEntryGroupName = EntryGroupName.FromProjectLocationEntryGroup("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"),
            EntryId = "",
            Entry = new Entry(),
        };
        // Make the request
        Entry response = catalogServiceClient.CreateEntry(request);
    }
}

Go

Go

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

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


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.NewCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

Java

Java

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

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

import com.google.cloud.dataplex.v1.CatalogServiceClient;
import com.google.cloud.dataplex.v1.CreateEntryRequest;
import com.google.cloud.dataplex.v1.Entry;
import com.google.cloud.dataplex.v1.EntryGroupName;

public class SyncCreateEntry {

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

  public static void syncCreateEntry() 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 (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
      CreateEntryRequest request =
          CreateEntryRequest.newBuilder()
              .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
              .setEntryId("entryId-1591558867")
              .setEntry(Entry.newBuilder().build())
              .build();
      Entry response = catalogServiceClient.createEntry(request);
    }
  }
}

Python

Python

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

כדי לבצע אימות ב-Dataplex Universal 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_entry():
    # Create a client
    client = dataplex_v1.CatalogServiceClient()

    # Initialize request argument(s)
    entry = dataplex_v1.Entry()
    entry.entry_type = "entry_type_value"

    request = dataplex_v1.CreateEntryRequest(
        parent="parent_value",
        entry_id="entry_id_value",
        entry=entry,
    )

    # Make the request
    response = client.create_entry(request=request)

    # Handle the response
    print(response)

Ruby

Ruby

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

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

require "google/cloud/dataplex/v1"

##
# Snippet for the create_entry call in the CatalogService 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::CatalogService::Client#create_entry.
#
def create_entry
  # Create a client object. The client can be reused for multiple calls.
  client = Google::Cloud::Dataplex::V1::CatalogService::Client.new

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

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

  # The returned object is of type Google::Cloud::Dataplex::V1::Entry.
  p result
end

REST

כדי ליצור רשומה בהתאמה אישית, משתמשים בשיטה entries.create.

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

ניהול קבוצות של רשומות

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

הצגת רשימת קבוצות הכניסה הזמינות

המסוף

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

    מעבר אל קטלוג

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

    בדף הזה מפורטות כל קבוצות הרשומות שזמינות ב-Dataplex Universal Catalog וב-Data Catalog.

  3. כדי לראות קבוצות מותאמות אישית של רשומות, לוחצים על הכרטיסייה מותאם אישית. בכרטיסייה Custom, בעמודה Catalog source מוצג המקום שבו נמצא המשאב – Dataplex Universal Catalog או Data Catalog.

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

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

  4. אופציונלי: כדי לראות את רשימת קבוצות הערכים בפרויקט שבחרתם, לוחצים על הכרטיסייה Custom (מותאם אישית) ואז על המתג Show from all projects (הצגה מכל הפרויקטים) כדי להעביר אותו למצב מושבת.

    המתג Show from all projects מופעל כברירת מחדל, והרשימה כוללת משאבים של Dataplex Universal Catalog מהארגון שבחרתם ומשאבים של Data Catalog מכל הארגונים שיש לכם גישה אליהם.

gcloud

כדי לראות את רשימת קבוצות הערכים הזמינות, משתמשים בפקודה gcloud dataplex entry-groups list.

C#‎

C#

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

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

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

public sealed partial class GeneratedCatalogServiceClientSnippets
{
    /// <summary>Snippet for ListEntryGroups</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 ListEntryGroupsRequestObject()
    {
        // Create client
        CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
        // Initialize request argument(s)
        ListEntryGroupsRequest request = new ListEntryGroupsRequest
        {
            ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
            Filter = "",
            OrderBy = "",
        };
        // Make the request
        PagedEnumerable<ListEntryGroupsResponse, EntryGroup> response = catalogServiceClient.ListEntryGroups(request);

        // Iterate over all response items, lazily performing RPCs as required
        foreach (EntryGroup 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 (ListEntryGroupsResponse page in response.AsRawResponses())
        {
            // Do something with each page of items
            Console.WriteLine("A page of results:");
            foreach (EntryGroup 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<EntryGroup> 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 (EntryGroup 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

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

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


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.NewCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &dataplexpb.ListEntryGroupsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/dataplex/apiv1/dataplexpb#ListEntryGroupsRequest.
	}
	it := c.ListEntryGroups(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.ListEntryGroupsResponse)
	}
}

Java

Java

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

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

import com.google.cloud.dataplex.v1.CatalogServiceClient;
import com.google.cloud.dataplex.v1.EntryGroup;
import com.google.cloud.dataplex.v1.ListEntryGroupsRequest;
import com.google.cloud.dataplex.v1.LocationName;

public class SyncListEntryGroups {

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

  public static void syncListEntryGroups() 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 (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
      ListEntryGroupsRequest request =
          ListEntryGroupsRequest.newBuilder()
              .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
              .setPageSize(883849137)
              .setPageToken("pageToken873572522")
              .setFilter("filter-1274492040")
              .setOrderBy("orderBy-1207110587")
              .build();
      for (EntryGroup element : catalogServiceClient.listEntryGroups(request).iterateAll()) {
        // doThingsWith(element);
      }
    }
  }
}

Python

Python

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

כדי לבצע אימות ב-Dataplex Universal 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_entry_groups():
    # Create a client
    client = dataplex_v1.CatalogServiceClient()

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

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

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

Ruby

Ruby

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

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

require "google/cloud/dataplex/v1"

##
# Snippet for the list_entry_groups call in the CatalogService 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::CatalogService::Client#list_entry_groups.
#
def list_entry_groups
  # Create a client object. The client can be reused for multiple calls.
  client = Google::Cloud::Dataplex::V1::CatalogService::Client.new

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

  # Call the list_entry_groups method.
  result = client.list_entry_groups 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::EntryGroup.
    p item
  end
end

REST

כדי לראות את רשימת קבוצות הכניסה הזמינות, משתמשים ב-method‏ entryGroups.list.

הצגת פרטים של קבוצת רשומות

המסוף

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

    מעבר אל קטלוג

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

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

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

    אפשר לראות את הפרטים של קבוצת רשומות ב-Data Catalog גם בממשקי האינטרנט של Data Catalog וגם ב-Dataplex Universal Catalog. כדי לעשות את זה, בדף הפרטים של קבוצת הרשומות, לוחצים על Data Catalog או על Dataplex Universal Catalog.

    בקטע Sample entries מוצגות 10 רשומות קשורות שנוצרו לאחרונה בקבוצת הרשומות שנבחרה.

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

gcloud

כדי לאחזר את הפרטים של קבוצת רשומות, משתמשים בפקודה gcloud dataplex entry-groups describe.

C#‎

C#

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

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

using Google.Cloud.Dataplex.V1;

public sealed partial class GeneratedCatalogServiceClientSnippets
{
    /// <summary>Snippet for GetEntryGroup</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 GetEntryGroupRequestObject()
    {
        // Create client
        CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
        // Initialize request argument(s)
        GetEntryGroupRequest request = new GetEntryGroupRequest
        {
            EntryGroupName = EntryGroupName.FromProjectLocationEntryGroup("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"),
        };
        // Make the request
        EntryGroup response = catalogServiceClient.GetEntryGroup(request);
    }
}

Go

Go

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

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


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.NewCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

Java

Java

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

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

import com.google.cloud.dataplex.v1.CatalogServiceClient;
import com.google.cloud.dataplex.v1.EntryGroup;
import com.google.cloud.dataplex.v1.EntryGroupName;
import com.google.cloud.dataplex.v1.GetEntryGroupRequest;

public class SyncGetEntryGroup {

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

  public static void syncGetEntryGroup() 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 (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
      GetEntryGroupRequest request =
          GetEntryGroupRequest.newBuilder()
              .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
              .build();
      EntryGroup response = catalogServiceClient.getEntryGroup(request);
    }
  }
}

Python

Python

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

כדי לבצע אימות ב-Dataplex Universal 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_get_entry_group():
    # Create a client
    client = dataplex_v1.CatalogServiceClient()

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

    # Make the request
    response = client.get_entry_group(request=request)

    # Handle the response
    print(response)

Ruby

Ruby

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

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

require "google/cloud/dataplex/v1"

##
# Snippet for the get_entry_group call in the CatalogService 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::CatalogService::Client#get_entry_group.
#
def get_entry_group
  # Create a client object. The client can be reused for multiple calls.
  client = Google::Cloud::Dataplex::V1::CatalogService::Client.new

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

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

  # The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup.
  p result
end

REST

כדי לאחזר את הפרטים של קבוצת רשומות, משתמשים בשיטה entryGroups.get.

עדכון של קבוצת רשומות

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

המסוף

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

    מעבר אל קטלוג

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

  3. לוחצים על קבוצת הערכים שרוצים לעדכן.

  4. בדף פרטי קבוצת רשומות, לוחצים על עריכה.

  5. עורכים את השם לתצוגה, התיאור והתוויות לפי הצורך.

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

gcloud

כדי לעדכן קבוצת רשומות, משתמשים בפקודה gcloud dataplex entry-groups update.

C#‎

C#

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

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

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

public sealed partial class GeneratedCatalogServiceClientSnippets
{
    /// <summary>Snippet for UpdateEntryGroup</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 UpdateEntryGroupRequestObject()
    {
        // Create client
        CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
        // Initialize request argument(s)
        UpdateEntryGroupRequest request = new UpdateEntryGroupRequest
        {
            EntryGroup = new EntryGroup(),
            UpdateMask = new FieldMask(),
            ValidateOnly = false,
        };
        // Make the request
        Operation<EntryGroup, OperationMetadata> response = catalogServiceClient.UpdateEntryGroup(request);

        // Poll until the returned long-running operation is complete
        Operation<EntryGroup, OperationMetadata> completedResponse = response.PollUntilCompleted();
        // Retrieve the operation result
        EntryGroup 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<EntryGroup, OperationMetadata> retrievedResponse = catalogServiceClient.PollOnceUpdateEntryGroup(operationName);
        // Check if the retrieved long-running operation has completed
        if (retrievedResponse.IsCompleted)
        {
            // If it has completed, then access the result
            EntryGroup retrievedResult = retrievedResponse.Result;
        }
    }
}

Go

Go

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

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


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.NewCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &dataplexpb.UpdateEntryGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/dataplex/apiv1/dataplexpb#UpdateEntryGroupRequest.
	}
	op, err := c.UpdateEntryGroup(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במדריך למתחילים בנושא Dataplex Universal Catalog באמצעות ספריות לקוח. מידע נוסף מופיע במאמרי העזרה של Dataplex Universal Catalog Java API.

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

import com.google.cloud.dataplex.v1.CatalogServiceClient;
import com.google.cloud.dataplex.v1.EntryGroup;
import com.google.cloud.dataplex.v1.UpdateEntryGroupRequest;
import com.google.protobuf.FieldMask;

public class SyncUpdateEntryGroup {

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

  public static void syncUpdateEntryGroup() 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 (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
      UpdateEntryGroupRequest request =
          UpdateEntryGroupRequest.newBuilder()
              .setEntryGroup(EntryGroup.newBuilder().build())
              .setUpdateMask(FieldMask.newBuilder().build())
              .setValidateOnly(true)
              .build();
      EntryGroup response = catalogServiceClient.updateEntryGroupAsync(request).get();
    }
  }
}

Python

Python

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

כדי לבצע אימות ב-Dataplex Universal 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_update_entry_group():
    # Create a client
    client = dataplex_v1.CatalogServiceClient()

    # Initialize request argument(s)
    request = dataplex_v1.UpdateEntryGroupRequest()

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

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

    response = operation.result()

    # Handle the response
    print(response)

Ruby

Ruby

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

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

require "google/cloud/dataplex/v1"

##
# Snippet for the update_entry_group call in the CatalogService 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::CatalogService::Client#update_entry_group.
#
def update_entry_group
  # Create a client object. The client can be reused for multiple calls.
  client = Google::Cloud::Dataplex::V1::CatalogService::Client.new

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

  # Call the update_entry_group method.
  result = client.update_entry_group 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

כדי לעדכן קבוצת רשומות, משתמשים בשיטה entryGroups.patch.

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

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

המסוף

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

    מעבר אל קטלוג

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

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

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

gcloud

כדי למחוק קבוצת רשומות, משתמשים בפקודה gcloud dataplex entry-groups delete.

C#‎

C#

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

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

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

public sealed partial class GeneratedCatalogServiceClientSnippets
{
    /// <summary>Snippet for DeleteEntryGroup</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 DeleteEntryGroupRequestObject()
    {
        // Create client
        CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
        // Initialize request argument(s)
        DeleteEntryGroupRequest request = new DeleteEntryGroupRequest
        {
            EntryGroupName = EntryGroupName.FromProjectLocationEntryGroup("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]"),
            Etag = "",
        };
        // Make the request
        Operation<Empty, OperationMetadata> response = catalogServiceClient.DeleteEntryGroup(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 = catalogServiceClient.PollOnceDeleteEntryGroup(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

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

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


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.NewCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

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

Java

Java

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

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

import com.google.cloud.dataplex.v1.CatalogServiceClient;
import com.google.cloud.dataplex.v1.DeleteEntryGroupRequest;
import com.google.cloud.dataplex.v1.EntryGroupName;
import com.google.protobuf.Empty;

public class SyncDeleteEntryGroup {

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

  public static void syncDeleteEntryGroup() 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 (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
      DeleteEntryGroupRequest request =
          DeleteEntryGroupRequest.newBuilder()
              .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
              .setEtag("etag3123477")
              .build();
      catalogServiceClient.deleteEntryGroupAsync(request).get();
    }
  }
}

Python

Python

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

כדי לבצע אימות ב-Dataplex Universal 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_entry_group():
    # Create a client
    client = dataplex_v1.CatalogServiceClient()

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

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

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

    response = operation.result()

    # Handle the response
    print(response)

Ruby

Ruby

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

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

require "google/cloud/dataplex/v1"

##
# Snippet for the delete_entry_group call in the CatalogService 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::CatalogService::Client#delete_entry_group.
#
def delete_entry_group
  # Create a client object. The client can be reused for multiple calls.
  client = Google::Cloud::Dataplex::V1::CatalogService::Client.new

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

  # Call the delete_entry_group method.
  result = client.delete_entry_group 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

כדי למחוק קבוצת רשומות, משתמשים בשיטה entryGroups.delete.

ניהול סוגי רשומות

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

הצגת רשימה של סוגי הרשומות הזמינים

המסוף

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

    מעבר אל קטלוג

  2. לוחצים על הכרטיסייה סוגי רשומות.

  3. כדי לראות סוגים מותאמים אישית של רשומות, לוחצים על הכרטיסייה Custom (מותאם אישית). כדי לראות את סוגי הרשומות במערכת, לוחצים על הכרטיסייה System (מערכת). מידע נוסף על סוגי רשומות מותאמים אישית וסוגי רשומות של המערכת זמין בקטע קטגוריות של סוגי רשומות במסמך הזה.

  4. אופציונלי: כדי לראות את רשימת סוגי הרשומות בפרויקט שבחרתם, לוחצים על הכרטיסייה Custom (התאמה אישית) ואז על המתג Show from all projects (הצגה מכל הפרויקטים) כדי להעביר אותו למצב מושבת.

    המתג Show from all projects מופעל כברירת מחדל, והרשימה כוללת סוגי רשומות מכל הפרויקטים.

gcloud

כדי לראות את רשימת סוגי הרשומות הזמינים, משתמשים בפקודה gcloud dataplex entry-types list.

C#‎

C#

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

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

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

public sealed partial class GeneratedCatalogServiceClientSnippets
{
    /// <summary>Snippet for ListEntryTypes</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 ListEntryTypesRequestObject()
    {
        // Create client
        CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
        // Initialize request argument(s)
        ListEntryTypesRequest request = new ListEntryTypesRequest
        {
            ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
            Filter = "",
            OrderBy = "",
        };
        // Make the request
        PagedEnumerable<ListEntryTypesResponse, EntryType> response = catalogServiceClient.ListEntryTypes(request);

        // Iterate over all response items, lazily performing RPCs as required
        foreach (EntryType 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 (ListEntryTypesResponse page in response.AsRawResponses())
        {
            // Do something with each page of items
            Console.WriteLine("A page of results:");
            foreach (EntryType 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<EntryType> 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 (EntryType 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

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

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


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.NewCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &dataplexpb.ListEntryTypesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/dataplex/apiv1/dataplexpb#ListEntryTypesRequest.
	}
	it := c.ListEntryTypes(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.ListEntryTypesResponse)
	}
}

Java

Java

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

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

import com.google.cloud.dataplex.v1.CatalogServiceClient;
import com.google.cloud.dataplex.v1.EntryType;
import com.google.cloud.dataplex.v1.ListEntryTypesRequest;
import com.google.cloud.dataplex.v1.LocationName;

public class SyncListEntryTypes {

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

  public static void syncListEntryTypes() 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 (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
      ListEntryTypesRequest request =
          ListEntryTypesRequest.newBuilder()
              .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
              .setPageSize(883849137)
              .setPageToken("pageToken873572522")
              .setFilter("filter-1274492040")
              .setOrderBy("orderBy-1207110587")
              .build();
      for (EntryType element : catalogServiceClient.listEntryTypes(request).iterateAll()) {
        // doThingsWith(element);
      }
    }
  }
}

Python

Python

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

כדי לבצע אימות ב-Dataplex Universal 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_entry_types():
    # Create a client
    client = dataplex_v1.CatalogServiceClient()

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

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

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

Ruby

Ruby

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

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

require "google/cloud/dataplex/v1"

##
# Snippet for the list_entry_types call in the CatalogService 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::CatalogService::Client#list_entry_types.
#
def list_entry_types
  # Create a client object. The client can be reused for multiple calls.
  client = Google::Cloud::Dataplex::V1::CatalogService::Client.new

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

  # Call the list_entry_types method.
  result = client.list_entry_types 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::EntryType.
    p item
  end
end

REST

כדי לראות את רשימת סוגי הרשומות הזמינים, משתמשים בשיטה entryTypes.list.

הצגת פרטים של סוג רשומה

המסוף

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

    מעבר אל קטלוג

  2. לוחצים על הכרטיסייה סוגי רשומות > מותאם אישית.

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

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

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

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

gcloud

כדי לאחזר את הפרטים של סוג רשומה, משתמשים בפקודה gcloud dataplex entry-types describe.

C#‎

C#

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

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

using Google.Cloud.Dataplex.V1;

public sealed partial class GeneratedCatalogServiceClientSnippets
{
    /// <summary>Snippet for GetEntryType</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 GetEntryTypeRequestObject()
    {
        // Create client
        CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
        // Initialize request argument(s)
        GetEntryTypeRequest request = new GetEntryTypeRequest
        {
            EntryTypeName = EntryTypeName.FromProjectLocationEntryType("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]"),
        };
        // Make the request
        EntryType response = catalogServiceClient.GetEntryType(request);
    }
}

Go

Go

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

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


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.NewCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

Java

Java

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

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

import com.google.cloud.dataplex.v1.CatalogServiceClient;
import com.google.cloud.dataplex.v1.EntryType;
import com.google.cloud.dataplex.v1.EntryTypeName;
import com.google.cloud.dataplex.v1.GetEntryTypeRequest;

public class SyncGetEntryType {

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

  public static void syncGetEntryType() 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 (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
      GetEntryTypeRequest request =
          GetEntryTypeRequest.newBuilder()
              .setName(EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]").toString())
              .build();
      EntryType response = catalogServiceClient.getEntryType(request);
    }
  }
}

Python

Python

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

כדי לבצע אימות ב-Dataplex Universal 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_get_entry_type():
    # Create a client
    client = dataplex_v1.CatalogServiceClient()

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

    # Make the request
    response = client.get_entry_type(request=request)

    # Handle the response
    print(response)

Ruby

Ruby

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

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

require "google/cloud/dataplex/v1"

##
# Snippet for the get_entry_type call in the CatalogService 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::CatalogService::Client#get_entry_type.
#
def get_entry_type
  # Create a client object. The client can be reused for multiple calls.
  client = Google::Cloud::Dataplex::V1::CatalogService::Client.new

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

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

  # The returned object is of type Google::Cloud::Dataplex::V1::EntryType.
  p result
end

REST

כדי לאחזר את הפרטים של סוג רשומה, משתמשים בשיטה entryTypes.get.

עדכון סוג רשומה

המסוף

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

    מעבר אל קטלוג

  2. לוחצים על הכרטיסייה סוגי רשומות > מותאם אישית.

  3. לוחצים על סוג הרשומה שרוצים לעדכן.

  4. בדף פרטים של סוג הרשומה, לוחצים על עריכה.

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

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

gcloud

כדי לעדכן סוג רשומה, משתמשים בפקודה gcloud dataplex entry-types update.

C#‎

C#

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

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

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

public sealed partial class GeneratedCatalogServiceClientSnippets
{
    /// <summary>Snippet for UpdateEntryType</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 UpdateEntryTypeRequestObject()
    {
        // Create client
        CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
        // Initialize request argument(s)
        UpdateEntryTypeRequest request = new UpdateEntryTypeRequest
        {
            EntryType = new EntryType(),
            UpdateMask = new FieldMask(),
            ValidateOnly = false,
        };
        // Make the request
        Operation<EntryType, OperationMetadata> response = catalogServiceClient.UpdateEntryType(request);

        // Poll until the returned long-running operation is complete
        Operation<EntryType, OperationMetadata> completedResponse = response.PollUntilCompleted();
        // Retrieve the operation result
        EntryType 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<EntryType, OperationMetadata> retrievedResponse = catalogServiceClient.PollOnceUpdateEntryType(operationName);
        // Check if the retrieved long-running operation has completed
        if (retrievedResponse.IsCompleted)
        {
            // If it has completed, then access the result
            EntryType retrievedResult = retrievedResponse.Result;
        }
    }
}

Go

Go

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

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


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.NewCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &dataplexpb.UpdateEntryTypeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/dataplex/apiv1/dataplexpb#UpdateEntryTypeRequest.
	}
	op, err := c.UpdateEntryType(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במדריך למתחילים בנושא Dataplex Universal Catalog באמצעות ספריות לקוח. מידע נוסף מופיע במאמרי העזרה של Dataplex Universal Catalog Java API.

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

import com.google.cloud.dataplex.v1.CatalogServiceClient;
import com.google.cloud.dataplex.v1.EntryType;
import com.google.cloud.dataplex.v1.UpdateEntryTypeRequest;
import com.google.protobuf.FieldMask;

public class SyncUpdateEntryType {

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

  public static void syncUpdateEntryType() 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 (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
      UpdateEntryTypeRequest request =
          UpdateEntryTypeRequest.newBuilder()
              .setEntryType(EntryType.newBuilder().build())
              .setUpdateMask(FieldMask.newBuilder().build())
              .setValidateOnly(true)
              .build();
      EntryType response = catalogServiceClient.updateEntryTypeAsync(request).get();
    }
  }
}

Python

Python

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

כדי לבצע אימות ב-Dataplex Universal 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_update_entry_type():
    # Create a client
    client = dataplex_v1.CatalogServiceClient()

    # Initialize request argument(s)
    request = dataplex_v1.UpdateEntryTypeRequest()

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

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

    response = operation.result()

    # Handle the response
    print(response)

Ruby

Ruby

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

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

require "google/cloud/dataplex/v1"

##
# Snippet for the update_entry_type call in the CatalogService 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::CatalogService::Client#update_entry_type.
#
def update_entry_type
  # Create a client object. The client can be reused for multiple calls.
  client = Google::Cloud::Dataplex::V1::CatalogService::Client.new

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

  # Call the update_entry_type method.
  result = client.update_entry_type 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

כדי לעדכן סוג רשומה, משתמשים בשיטה entryTypes.patch.

מחיקה של סוג רשומה

המסוף

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

    מעבר אל קטלוג

  2. לוחצים על הכרטיסייה סוגי רשומות > מותאם אישית.

  3. לוחצים על סוג הרשומה שרוצים למחוק.

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

gcloud

כדי למחוק סוג רשומה, משתמשים בפקודה gcloud dataplex entry-types delete.

C#‎

C#

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

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

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

public sealed partial class GeneratedCatalogServiceClientSnippets
{
    /// <summary>Snippet for DeleteEntryType</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 DeleteEntryTypeRequestObject()
    {
        // Create client
        CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
        // Initialize request argument(s)
        DeleteEntryTypeRequest request = new DeleteEntryTypeRequest
        {
            EntryTypeName = EntryTypeName.FromProjectLocationEntryType("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]"),
            Etag = "",
        };
        // Make the request
        Operation<Empty, OperationMetadata> response = catalogServiceClient.DeleteEntryType(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 = catalogServiceClient.PollOnceDeleteEntryType(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

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

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


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.NewCatalogClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

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

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

Java

Java

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

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

import com.google.cloud.dataplex.v1.CatalogServiceClient;
import com.google.cloud.dataplex.v1.DeleteEntryTypeRequest;
import com.google.cloud.dataplex.v1.EntryTypeName;
import com.google.protobuf.Empty;

public class SyncDeleteEntryType {

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

  public static void syncDeleteEntryType() 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 (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
      DeleteEntryTypeRequest request =
          DeleteEntryTypeRequest.newBuilder()
              .setName(EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]").toString())
              .setEtag("etag3123477")
              .build();
      catalogServiceClient.deleteEntryTypeAsync(request).get();
    }
  }
}

Python

Python

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

כדי לבצע אימות ב-Dataplex Universal 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_entry_type():
    # Create a client
    client = dataplex_v1.CatalogServiceClient()

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

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

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

    response = operation.result()

    # Handle the response
    print(response)

Ruby

Ruby

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

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

require "google/cloud/dataplex/v1"

##
# Snippet for the delete_entry_type call in the CatalogService 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::CatalogService::Client#delete_entry_type.
#
def delete_entry_type
  # Create a client object. The client can be reused for multiple calls.
  client = Google::Cloud::Dataplex::V1::CatalogService::Client.new

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

  # Call the delete_entry_type method.
  result = client.delete_entry_type 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

כדי למחוק סוג רשומה, משתמשים בשיטה entryTypes.delete.

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