Skip to main content

fields

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

Overview

Namefields
TypeResource
Idgoogle.datacatalog.fields

Fields

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_tag_templates_fields_createINSERTlocationsId, projectsId, tagTemplatesIdCreates a field in a tag template. You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see Data Catalog resource project.
projects_locations_tag_templates_fields_deleteDELETEfieldsId, locationsId, projectsId, tagTemplatesIdDeletes a field in a tag template and all uses of this field from the tags based on this template. You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.
projects_locations_tag_templates_fields_patchUPDATEfieldsId, locationsId, projectsId, tagTemplatesIdUpdates a field in a tag template. You can't update the field type with this method. You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.
projects_locations_tag_templates_fields_renameEXECfieldsId, locationsId, projectsId, tagTemplatesIdRenames a field in a tag template. You must enable the Data Catalog API in the project identified by the name parameter. For more information, see [Data Catalog resource project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project).

INSERT example

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

/*+ create */
INSERT INTO google.datacatalog.fields (
locationsId,
projectsId,
tagTemplatesId,
name,
displayName,
type,
isRequired,
description,
order
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ tagTemplatesId }}',
'{{ name }}',
'{{ displayName }}',
'{{ type }}',
{{ isRequired }},
'{{ description }}',
'{{ order }}'
;

UPDATE example

Updates a fields resource.

/*+ update */
UPDATE google.datacatalog.fields
SET
name = '{{ name }}',
displayName = '{{ displayName }}',
type = '{{ type }}',
isRequired = true|false,
description = '{{ description }}',
order = '{{ order }}'
WHERE
fieldsId = '{{ fieldsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND tagTemplatesId = '{{ tagTemplatesId }}';

DELETE example

Deletes the specified fields resource.

/*+ delete */
DELETE FROM google.datacatalog.fields
WHERE fieldsId = '{{ fieldsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND tagTemplatesId = '{{ tagTemplatesId }}';