Skip to main content

tags

Creates, updates, deletes, gets or lists a tags resource.

Overview

Nametags
TypeResource
Idgoogle.datacatalog.tags

Fields

NameDatatypeDescription
namestringIdentifier. The resource name of the tag in URL format where tag ID is a system-generated identifier. Note: The tag itself might not be stored in the location specified in its name.
columnstringResources like entry can have schemas associated with them. This scope allows you to attach tags to an individual column based on that schema. To attach a tag to a nested column, separate column names with a dot (.). Example: column.nested_column.
fieldsobjectRequired. Maps the ID of a tag field to its value and additional information about that field. Tag template defines valid field IDs. A tag must have at least 1 field and at most 500 fields.
templatestringRequired. The resource name of the tag template this tag uses. Example: projects/{PROJECT_ID}/locations/{LOCATION}/tagTemplates/{TAG_TEMPLATE_ID} This field cannot be modified after creation.
templateDisplayNamestringOutput only. The display name of the tag template.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_entry_groups_entries_tags_listSELECTentriesId, entryGroupsId, locationsId, projectsIdLists tags assigned to an Entry. The columns in the response are lowercased.
projects_locations_entry_groups_tags_listSELECTentryGroupsId, locationsId, projectsIdLists tags assigned to an Entry. The columns in the response are lowercased.
projects_locations_entry_groups_entries_tags_createINSERTentriesId, entryGroupsId, locationsId, projectsIdCreates a tag and assigns it to: An Entry if the method name is projects.locations.entryGroups.entries.tags.create. Or EntryGroupif the method name is projects.locations.entryGroups.tags.create. Note: The project identified by the parent parameter for the [tag] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) and the [tag template] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) used to create the tag must be in the same organization.
projects_locations_entry_groups_tags_createINSERTentryGroupsId, locationsId, projectsIdCreates a tag and assigns it to: An Entry if the method name is projects.locations.entryGroups.entries.tags.create. Or EntryGroupif the method name is projects.locations.entryGroups.tags.create. Note: The project identified by the parent parameter for the [tag] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) and the [tag template] (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) used to create the tag must be in the same organization.
projects_locations_entry_groups_entries_tags_deleteDELETEentriesId, entryGroupsId, locationsId, projectsId, tagsIdDeletes a tag.
projects_locations_entry_groups_tags_deleteDELETEentryGroupsId, locationsId, projectsId, tagsIdDeletes a tag.
projects_locations_entry_groups_entries_tags_patchUPDATEentriesId, entryGroupsId, locationsId, projectsId, tagsIdUpdates an existing tag.
projects_locations_entry_groups_tags_patchUPDATEentryGroupsId, locationsId, projectsId, tagsIdUpdates an existing tag.
projects_locations_entry_groups_entries_tags_reconcileEXECentriesId, entryGroupsId, locationsId, projectsIdReconcileTags creates or updates a list of tags on the entry. If the ReconcileTagsRequest.force_delete_missing parameter is set, the operation deletes tags not included in the input tag list. ReconcileTags returns a long-running operation resource that can be queried with Operations.GetOperation to return ReconcileTagsMetadata and a ReconcileTagsResponse message.

SELECT examples

Lists tags assigned to an Entry. The columns in the response are lowercased.

SELECT
name,
column,
fields,
template,
templateDisplayName
FROM google.datacatalog.tags
WHERE entryGroupsId = '{{ entryGroupsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new tags resource.

/*+ create */
INSERT INTO google.datacatalog.tags (
entryGroupsId,
locationsId,
projectsId,
name,
template,
column,
fields
)
SELECT
'{{ entryGroupsId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ template }}',
'{{ column }}',
'{{ fields }}'
;

UPDATE example

Updates a tags resource.

/*+ update */
UPDATE google.datacatalog.tags
SET
name = '{{ name }}',
template = '{{ template }}',
column = '{{ column }}',
fields = '{{ fields }}'
WHERE
entryGroupsId = '{{ entryGroupsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND tagsId = '{{ tagsId }}';

DELETE example

Deletes the specified tags resource.

/*+ delete */
DELETE FROM google.datacatalog.tags
WHERE entryGroupsId = '{{ entryGroupsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND tagsId = '{{ tagsId }}';