Skip to main content

attributes

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

Overview

Nameattributes
TypeResource
Idgoogle.dataplex.attributes

Fields

NameDatatypeDescription
namestringOutput only. The relative resource name of the dataAttribute, of the form: projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}.
descriptionstringOptional. Description of the DataAttribute.
attributeCountintegerOutput only. The number of child attributes present for this attribute.
createTimestringOutput only. The time when the DataAttribute was created.
dataAccessSpecobjectDataAccessSpec holds the access control configuration to be enforced on data stored within resources (eg: rows, columns in BigQuery Tables). When associated with data, the data is only accessible to principals explicitly granted access through the DataAccessSpec. Principals with access to the containing resource are not implicitly granted access.
displayNamestringOptional. User friendly display name.
etagstringThis checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
labelsobjectOptional. User-defined labels for the DataAttribute.
parentIdstringOptional. The ID of the parent DataAttribute resource, should belong to the same data taxonomy. Circular dependency in parent chain is not valid. Maximum depth of the hierarchy allowed is 4. a -> b -> c -> d -> e, depth = 4
resourceAccessSpecobjectResourceAccessSpec holds the access control configuration to be enforced on the resources, for example, Cloud Storage bucket, BigQuery dataset, BigQuery table.
uidstringOutput only. System generated globally unique ID for the DataAttribute. This ID will be different if the DataAttribute is deleted and re-created with the same name.
updateTimestringOutput only. The time when the DataAttribute was last updated.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_data_taxonomies_attributes_getSELECTattributesId, dataTaxonomiesId, locationsId, projectsIdRetrieves a Data Attribute resource.
projects_locations_data_taxonomies_attributes_listSELECTdataTaxonomiesId, locationsId, projectsIdLists Data Attribute resources in a DataTaxonomy.
projects_locations_data_taxonomies_attributes_createINSERTdataTaxonomiesId, locationsId, projectsIdCreate a DataAttribute resource.
projects_locations_data_taxonomies_attributes_deleteDELETEattributesId, dataTaxonomiesId, locationsId, projectsIdDeletes a Data Attribute resource.
projects_locations_data_taxonomies_attributes_patchUPDATEattributesId, dataTaxonomiesId, locationsId, projectsIdUpdates a DataAttribute resource.

SELECT examples

Lists Data Attribute resources in a DataTaxonomy.

SELECT
name,
description,
attributeCount,
createTime,
dataAccessSpec,
displayName,
etag,
labels,
parentId,
resourceAccessSpec,
uid,
updateTime
FROM google.dataplex.attributes
WHERE dataTaxonomiesId = '{{ dataTaxonomiesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.dataplex.attributes (
dataTaxonomiesId,
locationsId,
projectsId,
description,
displayName,
labels,
parentId,
etag,
resourceAccessSpec,
dataAccessSpec
)
SELECT
'{{ dataTaxonomiesId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ description }}',
'{{ displayName }}',
'{{ labels }}',
'{{ parentId }}',
'{{ etag }}',
'{{ resourceAccessSpec }}',
'{{ dataAccessSpec }}'
;

UPDATE example

Updates a attributes resource.

/*+ update */
UPDATE google.dataplex.attributes
SET
description = '{{ description }}',
displayName = '{{ displayName }}',
labels = '{{ labels }}',
parentId = '{{ parentId }}',
etag = '{{ etag }}',
resourceAccessSpec = '{{ resourceAccessSpec }}',
dataAccessSpec = '{{ dataAccessSpec }}'
WHERE
attributesId = '{{ attributesId }}'
AND dataTaxonomiesId = '{{ dataTaxonomiesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified attributes resource.

/*+ delete */
DELETE FROM google.dataplex.attributes
WHERE attributesId = '{{ attributesId }}'
AND dataTaxonomiesId = '{{ dataTaxonomiesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';