Manage entries and ingest custom sources Stay organized with collections Save and categorize content based on your preferences.
This document explains how to bring information about your unique, custom datasources into Dataplex Universal Catalog.
Dataplex Universal Catalog serves as a central registry for all yourdata assets. To integrate a custom source, you need three key components:
Entry group: This is a secured container that holds your custom data records.Think of it as a folder that defines access permissions and the geographiclocation (region) for your records.
Entry type: This acts as a template or schema. It defines the requiredmetadata fields (like data owner, update frequency, or quality score) for aspecific kind of data asset.
Entry: This is the individual record or asset itself (for example, a specificproprietary file or database table).
The integration process
To register a custom data source, you need to set up this structure:
Create an entry group (the folder).
Define an entry type (the template/schema).
Create the custom entry (the data record) using the template within thefolder.
Entries
An entry represents a data asset that you capture metadata for. Every entry isan instance of an entry type. Each operation on aspects for an entry needs tocomply with the required aspects of its entry type. For example, when you createan entry, you must provide values for all the aspect types defined by theentry type. You can't delete those aspects for an entry that are marked asrequired in the entry type.
Categories of entries
System entries: Dataplex Universal Catalog creates entries for Google Cloudresources, such as BigQuery datasets or tables. The entries thatDataplex Universal Catalog creates are called system entries. Dataplex Universal Catalogautomatically keeps system entries up-to-date through continuous metadatasynchronization from the supported Google Cloud systems.
You can't modify the metadata that is populated automatically (called requiredaspects) for system entries. You can only add and modify additional metadatafor system entries by using optional aspects. For more information, seeCategories of aspects.
Custom entries: entries that you can create and manage forcustom resources are called custom entries. Custom resources are the resourcesin non-Google services that are hosted either in Google Cloud or externally(for example, on-premises).
Entry groups
An entry group is a container for one or more entries. You can use entry groupsto manage access control and regional location for the entries. Every entrygroup belongs to a project.
Categories of entry groups
System entry groups: for Google Cloud resources, Dataplex Universal Catalogautomatically creates entry groups for each system in every project andlocation where the resources are. For example,
@bigqueryis the system entrygroup for BigQuery.Custom entry groups: Entry groups that you create for custom resources.
Entry types
Entry types define the required metadata for entries of this type, using a setof required aspect types.
You can specify the required aspect types only on entries, and not on thecolumns of an entry. When you create an entry of a specific entry type,you must provide values for all required aspect types that are specified by theentry type.
Required aspect types that are referenced within an entry type must belong to thesame project as the entry type.
Categories of entry types
Custom entry types: Entry types that you create and manage. You can usethese entry types to create custom entries.
System entry types: Dataplex Universal Catalog provides these entry typesby default. System entry types are further categorized into reusable andrestricted.
The following table describes the categories of system entry types, and thelist of entry types that Dataplex Universal Catalog provides for each of the categories:
Category of system entry type Description Entry types that Dataplex Universal Catalog provides Reusable system entry type You can use this entry type to create custom entries. generic
Restricted system entry type These are reserved for system use, such as creating entries forGoogle Cloud resources.
You can't use these entry types to create entries, but you can edit entriesof these entry types to add optional aspects.Including but not limited to: analytics-hub-exchangeanalytics-hub-listingaspecttypebigquery-datasetbigquery-tablecloudsql-databasecloudsql-instancecloudsql-tableentrygroupentrytypesql-accessstoragestorage-bucketstorage-folder
entrygroup represent entry groups and areautomatically created when an entry group is created. You can search for entriesof this type. Unlike regular entries, you can't delete these entries. Instead,you must delete the entry group.You can create a custom entry type in a specific regional location or as aglobal resource. The location of anentry type impacts the scope of its applicability. For more information, seeProject and location constraints.
System entry types are always global. System entry types are stored in aGoogle-managed project with project ID655216118709. For example,projects/655216118709/locations/global/entryTypes/bigquery-table.
Before you begin
Before you manage entries and ingest custom data sources, ensure that you havecompleted the tasks described in this section.
Required roles
To get the permissions that you need to create and manage entries, ask your administrator to grant you the following IAM roles on the resource:
- Full set of permissions on entries, entry groups, and entry types:Dataplex Catalog Admin (
roles/dataplex.catalogAdmin) - Create and manage metadata resources in Dataplex Universal Catalog, including entries, entry groups, and entry types:Dataplex Catalog Editor (
roles/dataplex.catalogEditor) - Full access to entry-related operations:Dataplex Entry and EntryLink Owner (
roles/dataplex.entryOwner) - View entries, entry groups, and entry types, and IAM policies associated with them:Dataplex Catalog Viewer (
roles/dataplex.catalogViewer) - Use aspect types to create aspects of those types, when creating custom entries:Dataplex Aspect Type User (
roles/dataplex.aspectTypeUser) - Create and manage entry groups:Dataplex Entry Group Owner (
roles/dataplex.entryGroupOwner) - Create and manage entry types:Dataplex Entry Type Owner (
roles/dataplex.entryTypeOwner) - Use entry types to create and modify entries of those types:Dataplex Entry Type User (
roles/dataplex.entryTypeUser)
For more information about granting roles, seeManage access to projects, folders, and organizations.
You might also be able to get the required permissions throughcustom roles or otherpredefined roles.
Note: When you use an entry type to create and modify entries of that type, ifthe entry type and the entry are in different projects, you must grant theDataplex Entry Type User (roles/dataplex.entryTypeUser) IAM role on theproject where the entry type is.For more information, seeDataplex Universal Catalog IAM roles.
Enable the API
Enable the Dataplex API in your Dataplex Universal Catalog project.
Create an entry group
Console
In the Google Cloud console, go to the Dataplex Universal CatalogCatalog page.
Click theEntry groups> Custom tab.
ClickCreate entry group (Dataplex Universal Catalog).
In theCreate entry group window, enter the following:
- Optional: In theDisplay name field, enter a display name for yourentry group.
- Entry group ID: Enter a unique ID for your entry group.
- Optional: In theDescription field, enter a description for yourentry group.
- Location: Select a location. You can't modify the location afteryou create the entry group.
Optional: In theLabels section, add arbitrary labels as key-valuepairs to your resources:
- ClickAdd label.
- In theKey field, enter a key.
- In theValue field, enter a value for the key.
- To add more labels, clickAdd label and repeat the steps.
ClickSave.
gcloud
To create an entry group, use thegcloud dataplex entry-groups create command.
C#
C#
Before trying this sample, follow theC# setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogC# API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
usingGoogle.Api.Gax.ResourceNames;usingGoogle.Cloud.Dataplex.V1;usingGoogle.LongRunning;publicsealedpartialclassGeneratedCatalogServiceClientSnippets{/// <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>publicvoidCreateEntryGroupRequestObject(){// Create clientCatalogServiceClientcatalogServiceClient=CatalogServiceClient.Create();// Initialize request argument(s)CreateEntryGroupRequestrequest=newCreateEntryGroupRequest{ParentAsLocationName=LocationName.FromProjectLocation("[PROJECT]","[LOCATION]"),EntryGroupId="",EntryGroup=newEntryGroup(),ValidateOnly=false,};// Make the requestOperation<EntryGroup,OperationMetadata>response=catalogServiceClient.CreateEntryGroup(request);// Poll until the returned long-running operation is completeOperation<EntryGroup,OperationMetadata>completedResponse=response.PollUntilCompleted();// Retrieve the operation resultEntryGroupresult=completedResponse.Result;// Or get the name of the operationstringoperationName=response.Name;// This name can be stored, then the long-running operation retrieved later by nameOperation<EntryGroup,OperationMetadata>retrievedResponse=catalogServiceClient.PollOnceCreateEntryGroup(operationName);// Check if the retrieved long-running operation has completedif(retrievedResponse.IsCompleted){// If it has completed, then access the resultEntryGroupretrievedResult=retrievedResponse.Result;}}}Go
Go
Before trying this sample, follow theGo setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogGo API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
packagemainimport("context"dataplex"cloud.google.com/go/dataplex/apiv1"dataplexpb"cloud.google.com/go/dataplex/apiv1/dataplexpb")funcmain(){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_Optionsc,err:=dataplex.NewCatalogClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}Java
Java
Before trying this sample, follow theJava setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogJava API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
importcom.google.cloud.dataplex.v1.CatalogServiceClient;importcom.google.cloud.dataplex.v1.CreateEntryGroupRequest;importcom.google.cloud.dataplex.v1.EntryGroup;importcom.google.cloud.dataplex.v1.LocationName;publicclassSyncCreateEntryGroup{publicstaticvoidmain(String[]args)throwsException{syncCreateEntryGroup();}publicstaticvoidsyncCreateEntryGroup()throwsException{// 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_librarytry(CatalogServiceClientcatalogServiceClient=CatalogServiceClient.create()){CreateEntryGroupRequestrequest=CreateEntryGroupRequest.newBuilder().setParent(LocationName.of("[PROJECT]","[LOCATION]").toString()).setEntryGroupId("entryGroupId1228924712").setEntryGroup(EntryGroup.newBuilder().build()).setValidateOnly(true).build();EntryGroupresponse=catalogServiceClient.createEntryGroupAsync(request).get();}}}Python
Python
Before trying this sample, follow thePython setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogPython API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
# 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.htmlfromgoogle.cloudimportdataplex_v1defsample_create_entry_group():# Create a clientclient=dataplex_v1.CatalogServiceClient()# Initialize request argument(s)request=dataplex_v1.CreateEntryGroupRequest(parent="parent_value",entry_group_id="entry_group_id_value",)# Make the requestoperation=client.create_entry_group(request=request)print("Waiting for operation to complete...")response=operation.result()# Handle the responseprint(response)Ruby
Ruby
Before trying this sample, follow theRuby setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogRuby API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
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.#defcreate_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_grouprequest# 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:60ifresult.response?presult.responseelseputs"No response received."endendREST
To create an entry group, use theentryGroups.Createmethod.
Create an entry type
To ingest a new source, you must create an entry type.
Console
In the Google Cloud console, go to the Dataplex Universal CatalogCatalog page.
Click theEntry types> Custom tab.
ClickCreate.
In theCreate entry type window, enter the following:
- Optional: In theDisplay name field, enter a display name for yourentry type.
- Entry type ID: Enter a unique ID for your entry type. You can'tmodify this after you create the entry type.
- Optional: In theDescription field, enter a description for yourentry type.
- Optional: In theSystem field, enter the source system.
- Optional: In thePlatform field, enter the platform that entriesof this type belong to. For example,
Google Cloud. - In theLocation field, select a location. You can't modify thelocation after you create the entry type.
Optional: In theType aliases section, define the data type foryour entry type. The data type can be used for querying entries.
- ClickAdd type alias.
- In theType alias field, select a data type. You can add multipletype aliases.
In theRequired aspect types section, select the aspect types thatare mandatory for this entry type. Each entry that is created based onthis type will have these required aspect types assigned.The list of required aspect types can't be modified after you create the entry type.
- ClickChoose aspect type.
- In theSelect aspect types window, select the aspect type.
- ClickSelect.
You can't delete the required aspects from an entry.
Optional: In theLabels section, add arbitrary labels as key-valuepairs to your resources:
- ClickAdd label.
- In theKey field, enter a key.
- In theValue field, enter a value for the key.
- To add more labels, clickAdd label and repeat the steps.
ClickSave.
gcloud
To create an entry type, use thegcloud dataplex entry-types create command.
C#
C#
Before trying this sample, follow theC# setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogC# API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
usingGoogle.Api.Gax.ResourceNames;usingGoogle.Cloud.Dataplex.V1;usingGoogle.LongRunning;publicsealedpartialclassGeneratedCatalogServiceClientSnippets{/// <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>publicvoidCreateEntryTypeRequestObject(){// Create clientCatalogServiceClientcatalogServiceClient=CatalogServiceClient.Create();// Initialize request argument(s)CreateEntryTypeRequestrequest=newCreateEntryTypeRequest{ParentAsLocationName=LocationName.FromProjectLocation("[PROJECT]","[LOCATION]"),EntryTypeId="",EntryType=newEntryType(),ValidateOnly=false,};// Make the requestOperation<EntryType,OperationMetadata>response=catalogServiceClient.CreateEntryType(request);// Poll until the returned long-running operation is completeOperation<EntryType,OperationMetadata>completedResponse=response.PollUntilCompleted();// Retrieve the operation resultEntryTyperesult=completedResponse.Result;// Or get the name of the operationstringoperationName=response.Name;// This name can be stored, then the long-running operation retrieved later by nameOperation<EntryType,OperationMetadata>retrievedResponse=catalogServiceClient.PollOnceCreateEntryType(operationName);// Check if the retrieved long-running operation has completedif(retrievedResponse.IsCompleted){// If it has completed, then access the resultEntryTyperetrievedResult=retrievedResponse.Result;}}}Go
Go
Before trying this sample, follow theGo setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogGo API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
packagemainimport("context"dataplex"cloud.google.com/go/dataplex/apiv1"dataplexpb"cloud.google.com/go/dataplex/apiv1/dataplexpb")funcmain(){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_Optionsc,err:=dataplex.NewCatalogClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}Java
Java
Before trying this sample, follow theJava setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogJava API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
importcom.google.cloud.dataplex.v1.CatalogServiceClient;importcom.google.cloud.dataplex.v1.CreateEntryTypeRequest;importcom.google.cloud.dataplex.v1.EntryType;importcom.google.cloud.dataplex.v1.LocationName;publicclassSyncCreateEntryType{publicstaticvoidmain(String[]args)throwsException{syncCreateEntryType();}publicstaticvoidsyncCreateEntryType()throwsException{// 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_librarytry(CatalogServiceClientcatalogServiceClient=CatalogServiceClient.create()){CreateEntryTypeRequestrequest=CreateEntryTypeRequest.newBuilder().setParent(LocationName.of("[PROJECT]","[LOCATION]").toString()).setEntryTypeId("entryTypeId-1105721081").setEntryType(EntryType.newBuilder().build()).setValidateOnly(true).build();EntryTyperesponse=catalogServiceClient.createEntryTypeAsync(request).get();}}}Python
Python
Before trying this sample, follow thePython setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogPython API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
# 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.htmlfromgoogle.cloudimportdataplex_v1defsample_create_entry_type():# Create a clientclient=dataplex_v1.CatalogServiceClient()# Initialize request argument(s)request=dataplex_v1.CreateEntryTypeRequest(parent="parent_value",entry_type_id="entry_type_id_value",)# Make the requestoperation=client.create_entry_type(request=request)print("Waiting for operation to complete...")response=operation.result()# Handle the responseprint(response)Ruby
Ruby
Before trying this sample, follow theRuby setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogRuby API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
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.#defcreate_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_typerequest# 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:60ifresult.response?presult.responseelseputs"No response received."endendREST
To create an entry type, use theentryTypes.createmethod.
Create a custom entry
Before you create a custom entry, ensure that you havecreated an entry group and anentry type.
Console
Creating a custom entry using the Google Cloud console isn't supported. Instead,use the Google Cloud CLI or the API.
gcloud
To create a custom entry, use thegcloud dataplex entries create command.
C#
C#
Before trying this sample, follow theC# setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogC# API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
usingGoogle.Cloud.Dataplex.V1;publicsealedpartialclassGeneratedCatalogServiceClientSnippets{/// <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>publicvoidCreateEntryRequestObject(){// Create clientCatalogServiceClientcatalogServiceClient=CatalogServiceClient.Create();// Initialize request argument(s)CreateEntryRequestrequest=newCreateEntryRequest{ParentAsEntryGroupName=EntryGroupName.FromProjectLocationEntryGroup("[PROJECT]","[LOCATION]","[ENTRY_GROUP]"),EntryId="",Entry=newEntry(),};// Make the requestEntryresponse=catalogServiceClient.CreateEntry(request);}}Go
Go
Before trying this sample, follow theGo setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogGo API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
packagemainimport("context"dataplex"cloud.google.com/go/dataplex/apiv1"dataplexpb"cloud.google.com/go/dataplex/apiv1/dataplexpb")funcmain(){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_Optionsc,err:=dataplex.NewCatalogClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}Java
Java
Before trying this sample, follow theJava setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogJava API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
importcom.google.cloud.dataplex.v1.CatalogServiceClient;importcom.google.cloud.dataplex.v1.CreateEntryRequest;importcom.google.cloud.dataplex.v1.Entry;importcom.google.cloud.dataplex.v1.EntryGroupName;publicclassSyncCreateEntry{publicstaticvoidmain(String[]args)throwsException{syncCreateEntry();}publicstaticvoidsyncCreateEntry()throwsException{// 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_librarytry(CatalogServiceClientcatalogServiceClient=CatalogServiceClient.create()){CreateEntryRequestrequest=CreateEntryRequest.newBuilder().setParent(EntryGroupName.of("[PROJECT]","[LOCATION]","[ENTRY_GROUP]").toString()).setEntryId("entryId-1591558867").setEntry(Entry.newBuilder().build()).build();Entryresponse=catalogServiceClient.createEntry(request);}}}Python
Python
Before trying this sample, follow thePython setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogPython API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
# 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.htmlfromgoogle.cloudimportdataplex_v1defsample_create_entry():# Create a clientclient=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 requestresponse=client.create_entry(request=request)# Handle the responseprint(response)Ruby
Ruby
Before trying this sample, follow theRuby setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogRuby API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
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.#defcreate_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_entryrequest# The returned object is of type Google::Cloud::Dataplex::V1::Entry.presultendREST
To create a custom entry, use theentries.createmethod.
After you create a custom entry, you can add aspects to the entry. Formore information, seeAdd aspects to an entry.
Manage entry groups
This section describes how to view the list of available entry groups, viewdetails, update, and delete entry groups.
View the list of available entry groups
Console
In the Google Cloud console, go to the Dataplex Universal CatalogCatalog page.
Click theEntry groups tab.
This page lists all the available Dataplex Universal Catalogand Data Catalog entry groups.
To view custom entry groups, click theCustom tab. In theCustom tab, theCatalog source column displays where the resourceresides—Dataplex Universal Catalog or Data Catalog.
To view system entry groups, click theSystem tab.
For more information about custom and system entry groups, see thecategories of entry groups section of thisdocument.
Optional: To view the list of entry groups in your selected project, clicktheCustom tab, and then click theShow from all projects toggleto the off position.
TheShow from all projects toggle is on by default, and the listincludes Dataplex Universal Catalog resources from your selectedorganization and Data Catalog resources from all the organizationsthat you can access.
Note: If theShow from all projects toggle is on, you can't editor delete an entry group directly. Instead, you must clickthe entry group to open the entry group details page, and then editor delete it.
gcloud
To view the list of available entry groups, use thegcloud dataplex entry-groups list command.
C#
C#
Before trying this sample, follow theC# setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogC# API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
usingGoogle.Api.Gax;usingGoogle.Api.Gax.ResourceNames;usingGoogle.Cloud.Dataplex.V1;usingSystem;publicsealedpartialclassGeneratedCatalogServiceClientSnippets{/// <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>publicvoidListEntryGroupsRequestObject(){// Create clientCatalogServiceClientcatalogServiceClient=CatalogServiceClient.Create();// Initialize request argument(s)ListEntryGroupsRequestrequest=newListEntryGroupsRequest{ParentAsLocationName=LocationName.FromProjectLocation("[PROJECT]","[LOCATION]"),Filter="",OrderBy="",};// Make the requestPagedEnumerable<ListEntryGroupsResponse,EntryGroup>response=catalogServiceClient.ListEntryGroups(request);// Iterate over all response items, lazily performing RPCs as requiredforeach(EntryGroupiteminresponse){// Do something with each itemConsole.WriteLine(item);}// Or iterate over pages (of server-defined size), performing one RPC per pageforeach(ListEntryGroupsResponsepageinresponse.AsRawResponses()){// Do something with each page of itemsConsole.WriteLine("A page of results:");foreach(EntryGroupiteminpage){// Do something with each itemConsole.WriteLine(item);}}// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as requiredintpageSize=10;Page<EntryGroup>singlePage=response.ReadPage(pageSize);// Do something with the page of itemsConsole.WriteLine($"A page of {pageSize} results (unless it's the final page):");foreach(EntryGroupiteminsinglePage){// Do something with each itemConsole.WriteLine(item);}// Store the pageToken, for when the next page is required.stringnextPageToken=singlePage.NextPageToken;}}Go
Go
Before trying this sample, follow theGo setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogGo API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
packagemainimport("context"dataplex"cloud.google.com/go/dataplex/apiv1"dataplexpb"cloud.google.com/go/dataplex/apiv1/dataplexpb""google.golang.org/api/iterator")funcmain(){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_Optionsc,err:=dataplex.NewCatalogClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=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
Before trying this sample, follow theJava setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogJava API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
importcom.google.cloud.dataplex.v1.CatalogServiceClient;importcom.google.cloud.dataplex.v1.EntryGroup;importcom.google.cloud.dataplex.v1.ListEntryGroupsRequest;importcom.google.cloud.dataplex.v1.LocationName;publicclassSyncListEntryGroups{publicstaticvoidmain(String[]args)throwsException{syncListEntryGroups();}publicstaticvoidsyncListEntryGroups()throwsException{// 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_librarytry(CatalogServiceClientcatalogServiceClient=CatalogServiceClient.create()){ListEntryGroupsRequestrequest=ListEntryGroupsRequest.newBuilder().setParent(LocationName.of("[PROJECT]","[LOCATION]").toString()).setPageSize(883849137).setPageToken("pageToken873572522").setFilter("filter-1274492040").setOrderBy("orderBy-1207110587").build();for(EntryGroupelement:catalogServiceClient.listEntryGroups(request).iterateAll()){// doThingsWith(element);}}}}Python
Python
Before trying this sample, follow thePython setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogPython API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
# 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.htmlfromgoogle.cloudimportdataplex_v1defsample_list_entry_groups():# Create a clientclient=dataplex_v1.CatalogServiceClient()# Initialize request argument(s)request=dataplex_v1.ListEntryGroupsRequest(parent="parent_value",)# Make the requestpage_result=client.list_entry_groups(request=request)# Handle the responseforresponseinpage_result:print(response)Ruby
Ruby
Before trying this sample, follow theRuby setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogRuby API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
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.#deflist_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_groupsrequest# 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.eachdo|item|# Each element is of type ::Google::Cloud::Dataplex::V1::EntryGroup.pitemendendREST
To view the list of available entry groups, use theentryGroups.listmethod.
View details of an entry group
Console
In the Google Cloud console, go to the Dataplex Universal CatalogCatalog page.
Click theEntry groups tab.
Click the entry group for which you want to view the details.
The entry group details page opens. You can access information such asdisplay name, entry group ID, description, project ID, location, labels,creation date, and last modified date of the selected entry group.
For a Data Catalog entry group, you can view the details inboth the Data Catalog and Dataplex Universal Catalog webinterfaces. To do this, on the entry group details page, clickData Catalog orDataplex Universal Catalog.
TheSample entries section displays 10 related entries created recentlyin the selected entry group.
Optional: To view all the entries related to an entry group, in theSample entriessection, clickShow all related entries in search.
gcloud
To retrieve the details of an entry group, use thegcloud dataplex entry-groups describe command.
C#
C#
Before trying this sample, follow theC# setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogC# API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
usingGoogle.Cloud.Dataplex.V1;publicsealedpartialclassGeneratedCatalogServiceClientSnippets{/// <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>publicvoidGetEntryGroupRequestObject(){// Create clientCatalogServiceClientcatalogServiceClient=CatalogServiceClient.Create();// Initialize request argument(s)GetEntryGroupRequestrequest=newGetEntryGroupRequest{EntryGroupName=EntryGroupName.FromProjectLocationEntryGroup("[PROJECT]","[LOCATION]","[ENTRY_GROUP]"),};// Make the requestEntryGroupresponse=catalogServiceClient.GetEntryGroup(request);}}Go
Go
Before trying this sample, follow theGo setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogGo API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
packagemainimport("context"dataplex"cloud.google.com/go/dataplex/apiv1"dataplexpb"cloud.google.com/go/dataplex/apiv1/dataplexpb")funcmain(){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_Optionsc,err:=dataplex.NewCatalogClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}Java
Java
Before trying this sample, follow theJava setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogJava API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
importcom.google.cloud.dataplex.v1.CatalogServiceClient;importcom.google.cloud.dataplex.v1.EntryGroup;importcom.google.cloud.dataplex.v1.EntryGroupName;importcom.google.cloud.dataplex.v1.GetEntryGroupRequest;publicclassSyncGetEntryGroup{publicstaticvoidmain(String[]args)throwsException{syncGetEntryGroup();}publicstaticvoidsyncGetEntryGroup()throwsException{// 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_librarytry(CatalogServiceClientcatalogServiceClient=CatalogServiceClient.create()){GetEntryGroupRequestrequest=GetEntryGroupRequest.newBuilder().setName(EntryGroupName.of("[PROJECT]","[LOCATION]","[ENTRY_GROUP]").toString()).build();EntryGroupresponse=catalogServiceClient.getEntryGroup(request);}}}Python
Python
Before trying this sample, follow thePython setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogPython API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
# 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.htmlfromgoogle.cloudimportdataplex_v1defsample_get_entry_group():# Create a clientclient=dataplex_v1.CatalogServiceClient()# Initialize request argument(s)request=dataplex_v1.GetEntryGroupRequest(name="name_value",)# Make the requestresponse=client.get_entry_group(request=request)# Handle the responseprint(response)Ruby
Ruby
Before trying this sample, follow theRuby setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogRuby API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
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.#defget_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_grouprequest# The returned object is of type Google::Cloud::Dataplex::V1::EntryGroup.presultendREST
To retrieve the details of an entry group, use theentryGroups.getmethod.
Update an entry group
You can update a custom entry group. System entry groups can't be modified.
Console
In the Google Cloud console, go to the Dataplex Universal CatalogCatalog page.
Click theEntry groups> Custom tab.
Click the entry group that you want to update.
On theEntry group details page, clickEdit.
Edit the display name, description, and labels, as required.
ClickSave.
gcloud
To update an entry group, use thegcloud dataplex entry-groups update command.
C#
C#
Before trying this sample, follow theC# setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogC# API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
usingGoogle.Cloud.Dataplex.V1;usingGoogle.LongRunning;usingGoogle.Protobuf.WellKnownTypes;publicsealedpartialclassGeneratedCatalogServiceClientSnippets{/// <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>publicvoidUpdateEntryGroupRequestObject(){// Create clientCatalogServiceClientcatalogServiceClient=CatalogServiceClient.Create();// Initialize request argument(s)UpdateEntryGroupRequestrequest=newUpdateEntryGroupRequest{EntryGroup=newEntryGroup(),UpdateMask=newFieldMask(),ValidateOnly=false,};// Make the requestOperation<EntryGroup,OperationMetadata>response=catalogServiceClient.UpdateEntryGroup(request);// Poll until the returned long-running operation is completeOperation<EntryGroup,OperationMetadata>completedResponse=response.PollUntilCompleted();// Retrieve the operation resultEntryGroupresult=completedResponse.Result;// Or get the name of the operationstringoperationName=response.Name;// This name can be stored, then the long-running operation retrieved later by nameOperation<EntryGroup,OperationMetadata>retrievedResponse=catalogServiceClient.PollOnceUpdateEntryGroup(operationName);// Check if the retrieved long-running operation has completedif(retrievedResponse.IsCompleted){// If it has completed, then access the resultEntryGroupretrievedResult=retrievedResponse.Result;}}}Go
Go
Before trying this sample, follow theGo setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogGo API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
packagemainimport("context"dataplex"cloud.google.com/go/dataplex/apiv1"dataplexpb"cloud.google.com/go/dataplex/apiv1/dataplexpb")funcmain(){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_Optionsc,err:=dataplex.NewCatalogClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}Java
Java
Before trying this sample, follow theJava setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogJava API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
importcom.google.cloud.dataplex.v1.CatalogServiceClient;importcom.google.cloud.dataplex.v1.EntryGroup;importcom.google.cloud.dataplex.v1.UpdateEntryGroupRequest;importcom.google.protobuf.FieldMask;publicclassSyncUpdateEntryGroup{publicstaticvoidmain(String[]args)throwsException{syncUpdateEntryGroup();}publicstaticvoidsyncUpdateEntryGroup()throwsException{// 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_librarytry(CatalogServiceClientcatalogServiceClient=CatalogServiceClient.create()){UpdateEntryGroupRequestrequest=UpdateEntryGroupRequest.newBuilder().setEntryGroup(EntryGroup.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).setValidateOnly(true).build();EntryGroupresponse=catalogServiceClient.updateEntryGroupAsync(request).get();}}}Python
Python
Before trying this sample, follow thePython setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogPython API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
# 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.htmlfromgoogle.cloudimportdataplex_v1defsample_update_entry_group():# Create a clientclient=dataplex_v1.CatalogServiceClient()# Initialize request argument(s)request=dataplex_v1.UpdateEntryGroupRequest()# Make the requestoperation=client.update_entry_group(request=request)print("Waiting for operation to complete...")response=operation.result()# Handle the responseprint(response)Ruby
Ruby
Before trying this sample, follow theRuby setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogRuby API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
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.#defupdate_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_grouprequest# 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:60ifresult.response?presult.responseelseputs"No response received."endendREST
To update an entry group, use theentryGroups.patchmethod.
Delete an entry group
You can delete a custom entry group. System entry groups can't be deleted.
Console
In the Google Cloud console, go to the Dataplex Universal CatalogCatalog page.
Click theEntry groups> Custom tab.
Click the entry group that you want to delete.
On theEntry group details page, clickDelete. Confirm whenprompted.
gcloud
To delete an entry group, use thegcloud dataplex entry-groups delete command.
C#
C#
Before trying this sample, follow theC# setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogC# API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
usingGoogle.Cloud.Dataplex.V1;usingGoogle.LongRunning;usingGoogle.Protobuf.WellKnownTypes;publicsealedpartialclassGeneratedCatalogServiceClientSnippets{/// <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>publicvoidDeleteEntryGroupRequestObject(){// Create clientCatalogServiceClientcatalogServiceClient=CatalogServiceClient.Create();// Initialize request argument(s)DeleteEntryGroupRequestrequest=newDeleteEntryGroupRequest{EntryGroupName=EntryGroupName.FromProjectLocationEntryGroup("[PROJECT]","[LOCATION]","[ENTRY_GROUP]"),Etag="",};// Make the requestOperation<Empty,OperationMetadata>response=catalogServiceClient.DeleteEntryGroup(request);// Poll until the returned long-running operation is completeOperation<Empty,OperationMetadata>completedResponse=response.PollUntilCompleted();// Retrieve the operation resultEmptyresult=completedResponse.Result;// Or get the name of the operationstringoperationName=response.Name;// This name can be stored, then the long-running operation retrieved later by nameOperation<Empty,OperationMetadata>retrievedResponse=catalogServiceClient.PollOnceDeleteEntryGroup(operationName);// Check if the retrieved long-running operation has completedif(retrievedResponse.IsCompleted){// If it has completed, then access the resultEmptyretrievedResult=retrievedResponse.Result;}}}Go
Go
Before trying this sample, follow theGo setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogGo API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
packagemainimport("context"dataplex"cloud.google.com/go/dataplex/apiv1"dataplexpb"cloud.google.com/go/dataplex/apiv1/dataplexpb")funcmain(){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_Optionsc,err:=dataplex.NewCatalogClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}Java
Java
Before trying this sample, follow theJava setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogJava API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
importcom.google.cloud.dataplex.v1.CatalogServiceClient;importcom.google.cloud.dataplex.v1.DeleteEntryGroupRequest;importcom.google.cloud.dataplex.v1.EntryGroupName;importcom.google.protobuf.Empty;publicclassSyncDeleteEntryGroup{publicstaticvoidmain(String[]args)throwsException{syncDeleteEntryGroup();}publicstaticvoidsyncDeleteEntryGroup()throwsException{// 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_librarytry(CatalogServiceClientcatalogServiceClient=CatalogServiceClient.create()){DeleteEntryGroupRequestrequest=DeleteEntryGroupRequest.newBuilder().setName(EntryGroupName.of("[PROJECT]","[LOCATION]","[ENTRY_GROUP]").toString()).setEtag("etag3123477").build();catalogServiceClient.deleteEntryGroupAsync(request).get();}}}Python
Python
Before trying this sample, follow thePython setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogPython API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
# 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.htmlfromgoogle.cloudimportdataplex_v1defsample_delete_entry_group():# Create a clientclient=dataplex_v1.CatalogServiceClient()# Initialize request argument(s)request=dataplex_v1.DeleteEntryGroupRequest(name="name_value",)# Make the requestoperation=client.delete_entry_group(request=request)print("Waiting for operation to complete...")response=operation.result()# Handle the responseprint(response)Ruby
Ruby
Before trying this sample, follow theRuby setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogRuby API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
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.#defdelete_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_grouprequest# 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:60ifresult.response?presult.responseelseputs"No response received."endendREST
To delete an entry group, use theentryGroups.deletemethod.
Manage entry types
This section describes how to view the list of available entry groups, viewdetails, update, and delete entry types.
View the list of available entry types
Console
In the Google Cloud console, go to the Dataplex Universal CatalogCatalog page.
Click theEntry types tab.
To view custom entry types, click theCustom tab. To view systementry types, click theSystem tab. For more information aboutcustom and system entry types, see thecategories of entry types section of thisdocument.
Optional: To view the list of entry types in your selected project, clicktheCustom tab, and then click theShow from all projects toggleto the off position.
TheShow from all projects toggle is on by default, and the listincludes entry types across all projects.
Note: If theShow from all projects toggle is on, you can't editor delete an entry type directly. Instead, you must clickthe entry type to open the entry type details page, and then editor delete it.
gcloud
To view the list of available entry types, use thegcloud dataplex entry-types list command.
C#
C#
Before trying this sample, follow theC# setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogC# API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
usingGoogle.Api.Gax;usingGoogle.Api.Gax.ResourceNames;usingGoogle.Cloud.Dataplex.V1;usingSystem;publicsealedpartialclassGeneratedCatalogServiceClientSnippets{/// <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>publicvoidListEntryTypesRequestObject(){// Create clientCatalogServiceClientcatalogServiceClient=CatalogServiceClient.Create();// Initialize request argument(s)ListEntryTypesRequestrequest=newListEntryTypesRequest{ParentAsLocationName=LocationName.FromProjectLocation("[PROJECT]","[LOCATION]"),Filter="",OrderBy="",};// Make the requestPagedEnumerable<ListEntryTypesResponse,EntryType>response=catalogServiceClient.ListEntryTypes(request);// Iterate over all response items, lazily performing RPCs as requiredforeach(EntryTypeiteminresponse){// Do something with each itemConsole.WriteLine(item);}// Or iterate over pages (of server-defined size), performing one RPC per pageforeach(ListEntryTypesResponsepageinresponse.AsRawResponses()){// Do something with each page of itemsConsole.WriteLine("A page of results:");foreach(EntryTypeiteminpage){// Do something with each itemConsole.WriteLine(item);}}// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as requiredintpageSize=10;Page<EntryType>singlePage=response.ReadPage(pageSize);// Do something with the page of itemsConsole.WriteLine($"A page of {pageSize} results (unless it's the final page):");foreach(EntryTypeiteminsinglePage){// Do something with each itemConsole.WriteLine(item);}// Store the pageToken, for when the next page is required.stringnextPageToken=singlePage.NextPageToken;}}Go
Go
Before trying this sample, follow theGo setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogGo API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
packagemainimport("context"dataplex"cloud.google.com/go/dataplex/apiv1"dataplexpb"cloud.google.com/go/dataplex/apiv1/dataplexpb""google.golang.org/api/iterator")funcmain(){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_Optionsc,err:=dataplex.NewCatalogClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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()iferr==iterator.Done{break}iferr!=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
Before trying this sample, follow theJava setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogJava API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
importcom.google.cloud.dataplex.v1.CatalogServiceClient;importcom.google.cloud.dataplex.v1.EntryType;importcom.google.cloud.dataplex.v1.ListEntryTypesRequest;importcom.google.cloud.dataplex.v1.LocationName;publicclassSyncListEntryTypes{publicstaticvoidmain(String[]args)throwsException{syncListEntryTypes();}publicstaticvoidsyncListEntryTypes()throwsException{// 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_librarytry(CatalogServiceClientcatalogServiceClient=CatalogServiceClient.create()){ListEntryTypesRequestrequest=ListEntryTypesRequest.newBuilder().setParent(LocationName.of("[PROJECT]","[LOCATION]").toString()).setPageSize(883849137).setPageToken("pageToken873572522").setFilter("filter-1274492040").setOrderBy("orderBy-1207110587").build();for(EntryTypeelement:catalogServiceClient.listEntryTypes(request).iterateAll()){// doThingsWith(element);}}}}Python
Python
Before trying this sample, follow thePython setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogPython API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
# 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.htmlfromgoogle.cloudimportdataplex_v1defsample_list_entry_types():# Create a clientclient=dataplex_v1.CatalogServiceClient()# Initialize request argument(s)request=dataplex_v1.ListEntryTypesRequest(parent="parent_value",)# Make the requestpage_result=client.list_entry_types(request=request)# Handle the responseforresponseinpage_result:print(response)Ruby
Ruby
Before trying this sample, follow theRuby setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogRuby API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
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.#deflist_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_typesrequest# 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.eachdo|item|# Each element is of type ::Google::Cloud::Dataplex::V1::EntryType.pitemendendREST
To view the list of available entry types, use theentryTypes.listmethod.
View details of an entry type
Console
In the Google Cloud console, go to the Dataplex Universal CatalogCatalog page.
Click theEntry types> Custom tab..
Click the entry type for which you want to view the details.
The entry type details page opens. You can access information such asdisplay name, entry type ID, description, project ID, location, platform,system, type aliases, labels, creation date, and last modified date ofthe selected entry type.
Optional: To view the list of 10 related entries created recently,click theSample entries tab.
Optional: To view all the entries related to an entry group, click theSample entries tab and then clickShow all related entries in search.
gcloud
To retrieve the details of an entry type, use thegcloud dataplex entry-types describe command.
C#
C#
Before trying this sample, follow theC# setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogC# API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
usingGoogle.Cloud.Dataplex.V1;publicsealedpartialclassGeneratedCatalogServiceClientSnippets{/// <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>publicvoidGetEntryTypeRequestObject(){// Create clientCatalogServiceClientcatalogServiceClient=CatalogServiceClient.Create();// Initialize request argument(s)GetEntryTypeRequestrequest=newGetEntryTypeRequest{EntryTypeName=EntryTypeName.FromProjectLocationEntryType("[PROJECT]","[LOCATION]","[ENTRY_TYPE]"),};// Make the requestEntryTyperesponse=catalogServiceClient.GetEntryType(request);}}Go
Go
Before trying this sample, follow theGo setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogGo API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
packagemainimport("context"dataplex"cloud.google.com/go/dataplex/apiv1"dataplexpb"cloud.google.com/go/dataplex/apiv1/dataplexpb")funcmain(){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_Optionsc,err:=dataplex.NewCatalogClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}Java
Java
Before trying this sample, follow theJava setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogJava API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
importcom.google.cloud.dataplex.v1.CatalogServiceClient;importcom.google.cloud.dataplex.v1.EntryType;importcom.google.cloud.dataplex.v1.EntryTypeName;importcom.google.cloud.dataplex.v1.GetEntryTypeRequest;publicclassSyncGetEntryType{publicstaticvoidmain(String[]args)throwsException{syncGetEntryType();}publicstaticvoidsyncGetEntryType()throwsException{// 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_librarytry(CatalogServiceClientcatalogServiceClient=CatalogServiceClient.create()){GetEntryTypeRequestrequest=GetEntryTypeRequest.newBuilder().setName(EntryTypeName.of("[PROJECT]","[LOCATION]","[ENTRY_TYPE]").toString()).build();EntryTyperesponse=catalogServiceClient.getEntryType(request);}}}Python
Python
Before trying this sample, follow thePython setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogPython API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
# 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.htmlfromgoogle.cloudimportdataplex_v1defsample_get_entry_type():# Create a clientclient=dataplex_v1.CatalogServiceClient()# Initialize request argument(s)request=dataplex_v1.GetEntryTypeRequest(name="name_value",)# Make the requestresponse=client.get_entry_type(request=request)# Handle the responseprint(response)Ruby
Ruby
Before trying this sample, follow theRuby setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogRuby API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
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.#defget_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_typerequest# The returned object is of type Google::Cloud::Dataplex::V1::EntryType.presultendREST
To retrieve the details of an entry type, use theentryTypes.getmethod.
Update an entry type
Console
In the Google Cloud console, go to the Dataplex Universal CatalogCatalog page.
Click theEntry types> Custom tab.
Click the entry type that you want to update.
On theEntry type details page, clickEdit.
Edit the display name, description, system, platform, type aliases,and labels, as required.
ClickSave.
gcloud
To update an entry type, use thegcloud dataplex entry-types update command.
C#
C#
Before trying this sample, follow theC# setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogC# API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
usingGoogle.Cloud.Dataplex.V1;usingGoogle.LongRunning;usingGoogle.Protobuf.WellKnownTypes;publicsealedpartialclassGeneratedCatalogServiceClientSnippets{/// <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>publicvoidUpdateEntryTypeRequestObject(){// Create clientCatalogServiceClientcatalogServiceClient=CatalogServiceClient.Create();// Initialize request argument(s)UpdateEntryTypeRequestrequest=newUpdateEntryTypeRequest{EntryType=newEntryType(),UpdateMask=newFieldMask(),ValidateOnly=false,};// Make the requestOperation<EntryType,OperationMetadata>response=catalogServiceClient.UpdateEntryType(request);// Poll until the returned long-running operation is completeOperation<EntryType,OperationMetadata>completedResponse=response.PollUntilCompleted();// Retrieve the operation resultEntryTyperesult=completedResponse.Result;// Or get the name of the operationstringoperationName=response.Name;// This name can be stored, then the long-running operation retrieved later by nameOperation<EntryType,OperationMetadata>retrievedResponse=catalogServiceClient.PollOnceUpdateEntryType(operationName);// Check if the retrieved long-running operation has completedif(retrievedResponse.IsCompleted){// If it has completed, then access the resultEntryTyperetrievedResult=retrievedResponse.Result;}}}Go
Go
Before trying this sample, follow theGo setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogGo API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
packagemainimport("context"dataplex"cloud.google.com/go/dataplex/apiv1"dataplexpb"cloud.google.com/go/dataplex/apiv1/dataplexpb")funcmain(){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_Optionsc,err:=dataplex.NewCatalogClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}Java
Java
Before trying this sample, follow theJava setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogJava API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
importcom.google.cloud.dataplex.v1.CatalogServiceClient;importcom.google.cloud.dataplex.v1.EntryType;importcom.google.cloud.dataplex.v1.UpdateEntryTypeRequest;importcom.google.protobuf.FieldMask;publicclassSyncUpdateEntryType{publicstaticvoidmain(String[]args)throwsException{syncUpdateEntryType();}publicstaticvoidsyncUpdateEntryType()throwsException{// 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_librarytry(CatalogServiceClientcatalogServiceClient=CatalogServiceClient.create()){UpdateEntryTypeRequestrequest=UpdateEntryTypeRequest.newBuilder().setEntryType(EntryType.newBuilder().build()).setUpdateMask(FieldMask.newBuilder().build()).setValidateOnly(true).build();EntryTyperesponse=catalogServiceClient.updateEntryTypeAsync(request).get();}}}Python
Python
Before trying this sample, follow thePython setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogPython API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
# 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.htmlfromgoogle.cloudimportdataplex_v1defsample_update_entry_type():# Create a clientclient=dataplex_v1.CatalogServiceClient()# Initialize request argument(s)request=dataplex_v1.UpdateEntryTypeRequest()# Make the requestoperation=client.update_entry_type(request=request)print("Waiting for operation to complete...")response=operation.result()# Handle the responseprint(response)Ruby
Ruby
Before trying this sample, follow theRuby setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogRuby API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
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.#defupdate_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_typerequest# 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:60ifresult.response?presult.responseelseputs"No response received."endendREST
To update an entry type, use theentryTypes.patchmethod.
Delete an entry type
Console
In the Google Cloud console, go to the Dataplex Universal CatalogCatalog page.
Click theEntry types> Custom tab.
Click the entry type that you want to delete.
On theEntry type details page, clickDelete. Confirm whenprompted.
gcloud
To delete an entry type, use thegcloud dataplex entry-types delete command.
C#
C#
Before trying this sample, follow theC# setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogC# API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
usingGoogle.Cloud.Dataplex.V1;usingGoogle.LongRunning;usingGoogle.Protobuf.WellKnownTypes;publicsealedpartialclassGeneratedCatalogServiceClientSnippets{/// <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>publicvoidDeleteEntryTypeRequestObject(){// Create clientCatalogServiceClientcatalogServiceClient=CatalogServiceClient.Create();// Initialize request argument(s)DeleteEntryTypeRequestrequest=newDeleteEntryTypeRequest{EntryTypeName=EntryTypeName.FromProjectLocationEntryType("[PROJECT]","[LOCATION]","[ENTRY_TYPE]"),Etag="",};// Make the requestOperation<Empty,OperationMetadata>response=catalogServiceClient.DeleteEntryType(request);// Poll until the returned long-running operation is completeOperation<Empty,OperationMetadata>completedResponse=response.PollUntilCompleted();// Retrieve the operation resultEmptyresult=completedResponse.Result;// Or get the name of the operationstringoperationName=response.Name;// This name can be stored, then the long-running operation retrieved later by nameOperation<Empty,OperationMetadata>retrievedResponse=catalogServiceClient.PollOnceDeleteEntryType(operationName);// Check if the retrieved long-running operation has completedif(retrievedResponse.IsCompleted){// If it has completed, then access the resultEmptyretrievedResult=retrievedResponse.Result;}}}Go
Go
Before trying this sample, follow theGo setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogGo API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
packagemainimport("context"dataplex"cloud.google.com/go/dataplex/apiv1"dataplexpb"cloud.google.com/go/dataplex/apiv1/dataplexpb")funcmain(){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_Optionsc,err:=dataplex.NewCatalogClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.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)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}Java
Java
Before trying this sample, follow theJava setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogJava API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
importcom.google.cloud.dataplex.v1.CatalogServiceClient;importcom.google.cloud.dataplex.v1.DeleteEntryTypeRequest;importcom.google.cloud.dataplex.v1.EntryTypeName;importcom.google.protobuf.Empty;publicclassSyncDeleteEntryType{publicstaticvoidmain(String[]args)throwsException{syncDeleteEntryType();}publicstaticvoidsyncDeleteEntryType()throwsException{// 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_librarytry(CatalogServiceClientcatalogServiceClient=CatalogServiceClient.create()){DeleteEntryTypeRequestrequest=DeleteEntryTypeRequest.newBuilder().setName(EntryTypeName.of("[PROJECT]","[LOCATION]","[ENTRY_TYPE]").toString()).setEtag("etag3123477").build();catalogServiceClient.deleteEntryTypeAsync(request).get();}}}Python
Python
Before trying this sample, follow thePython setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogPython API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
# 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.htmlfromgoogle.cloudimportdataplex_v1defsample_delete_entry_type():# Create a clientclient=dataplex_v1.CatalogServiceClient()# Initialize request argument(s)request=dataplex_v1.DeleteEntryTypeRequest(name="name_value",)# Make the requestoperation=client.delete_entry_type(request=request)print("Waiting for operation to complete...")response=operation.result()# Handle the responseprint(response)Ruby
Ruby
Before trying this sample, follow theRuby setup instructions in theDataplex Universal Catalog quickstart using client libraries. For more information, see theDataplex Universal CatalogRuby API reference documentation.
To authenticate to Dataplex Universal Catalog, set up Application Default Credentials. For more information, seeSet up authentication for a local development environment.
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.#defdelete_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_typerequest# 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:60ifresult.response?presult.responseelseputs"No response received."endendREST
To delete an entry type, use theentryTypes.deletemethod.
What's next
- Learn how tosearch for data assets in Dataplex Universal Catalog.
- Learn how tomanage aspects and enrich metadata.
- Learn how toimport metadata into Dataplex Universal Catalog.
- Learn moreabout metadata management in Dataplex Universal Catalog.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.