Skip to main content

data_assets

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

Overview

Namedata_assets
TypeResource
Idgoogle.dataplex.data_assets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. Resource name of the data asset. Format: projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_id}/dataAssets/{data_asset_id}
accessGroupConfigsobjectOptional. Access groups configurations for this data asset.The key is DataProduct.AccessGroup.id and the value is AccessGroupConfig.Example: { "analyst": { "iamRoles": ["roles/bigquery.dataViewer"] } } Currently, at most one IAM role is allowed per access group. For providing multiple predefined IAM roles, wrap them in a custom IAM role as per https://cloud.google.com/iam/docs/creating-custom-roles.
createTimestring (google-datetime)Output only. The time at which the data asset was created.
etagstringOptional. This 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 data asset.Example: { "environment": "production", "billing": "marketing-department" }
resourcestringRequired. Immutable. Full resource name of the cloud resource represented by the data asset. This must follow https://cloud.google.com/iam/docs/full-resource-names. Example: //bigquery.googleapis.com/projects/my_project_123/datasets/dataset_456/tables/table_789 Only BigQuery tables and datasets are currently supported. Data asset creator must have getIamPolicy and setIamPolicy permissions on the resource. Data asset creator must also have resource specific get permission, for instance, bigquery.tables.get for BigQuery tables.
uidstringOutput only. System generated globally unique ID for the data asset. This ID will be different if the data asset is deleted and re-created with the same name.
updateTimestring (google-datetime)Output only. The time at which the data asset was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_data_products_data_assets_getselectprojectsId, locationsId, dataProductsId, dataAssetsIdGets a data asset.
projects_locations_data_products_data_assets_listselectprojectsId, locationsId, dataProductsIdfilter, orderBy, pageSize, pageTokenLists data assets for a given data product.
projects_locations_data_products_data_assets_createinsertprojectsId, locationsId, dataProductsIddataAssetId, validateOnlyCreates a data asset.
projects_locations_data_products_data_assets_patchupdateprojectsId, locationsId, dataProductsId, dataAssetsIdupdateMask, validateOnlyUpdates a data asset.
projects_locations_data_products_data_assets_deletedeleteprojectsId, locationsId, dataProductsId, dataAssetsIdvalidateOnly, etagDeletes a data asset.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
dataAssetsIdstring
dataProductsIdstring
locationsIdstring
projectsIdstring
dataAssetIdstring
etagstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)
validateOnlyboolean

SELECT examples

Gets a data asset.

SELECT
name,
accessGroupConfigs,
createTime,
etag,
labels,
resource,
uid,
updateTime
FROM google.dataplex.data_assets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND dataProductsId = '{{ dataProductsId }}' -- required
AND dataAssetsId = '{{ dataAssetsId }}' -- required
;

INSERT examples

Creates a data asset.

INSERT INTO google.dataplex.data_assets (
data__etag,
data__labels,
data__accessGroupConfigs,
data__name,
data__resource,
projectsId,
locationsId,
dataProductsId,
dataAssetId,
validateOnly
)
SELECT
'{{ etag }}',
'{{ labels }}',
'{{ accessGroupConfigs }}',
'{{ name }}',
'{{ resource }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ dataProductsId }}',
'{{ dataAssetId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates a data asset.

UPDATE google.dataplex.data_assets
SET
data__etag = '{{ etag }}',
data__labels = '{{ labels }}',
data__accessGroupConfigs = '{{ accessGroupConfigs }}',
data__name = '{{ name }}',
data__resource = '{{ resource }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dataProductsId = '{{ dataProductsId }}' --required
AND dataAssetsId = '{{ dataAssetsId }}' --required
AND updateMask = '{{ updateMask}}'
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a data asset.

DELETE FROM google.dataplex.data_assets
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dataProductsId = '{{ dataProductsId }}' --required
AND dataAssetsId = '{{ dataAssetsId }}' --required
AND validateOnly = '{{ validateOnly }}'
AND etag = '{{ etag }}'
;