data_assets
Creates, updates, deletes, gets or lists a data_assets resource.
Overview
| Name | data_assets |
| Type | Resource |
| Id | google.dataplex.data_assets |
Fields
The following fields are returned by SELECT queries:
- projects_locations_data_products_data_assets_get
- projects_locations_data_products_data_assets_list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Resource name of the data asset. Format: projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_id}/dataAssets/{data_asset_id} |
accessGroupConfigs | object | Optional. 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. |
createTime | string (google-datetime) | Output only. The time at which the data asset was created. |
etag | string | Optional. 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. |
labels | object | Optional. User-defined labels for the data asset.Example: { "environment": "production", "billing": "marketing-department" } |
resource | string | Required. 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. |
uid | string | Output 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. |
updateTime | string (google-datetime) | Output only. The time at which the data asset was last updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Resource name of the data asset. Format: projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_id}/dataAssets/{data_asset_id} |
accessGroupConfigs | object | Optional. 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. |
createTime | string (google-datetime) | Output only. The time at which the data asset was created. |
etag | string | Optional. 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. |
labels | object | Optional. User-defined labels for the data asset.Example: { "environment": "production", "billing": "marketing-department" } |
resource | string | Required. 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. |
uid | string | Output 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. |
updateTime | string (google-datetime) | Output only. The time at which the data asset was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
projects_locations_data_products_data_assets_get | select | projectsId, locationsId, dataProductsId, dataAssetsId | Gets a data asset. | |
projects_locations_data_products_data_assets_list | select | projectsId, locationsId, dataProductsId | filter, orderBy, pageSize, pageToken | Lists data assets for a given data product. |
projects_locations_data_products_data_assets_create | insert | projectsId, locationsId, dataProductsId | dataAssetId, validateOnly | Creates a data asset. |
projects_locations_data_products_data_assets_patch | update | projectsId, locationsId, dataProductsId, dataAssetsId | updateMask, validateOnly | Updates a data asset. |
projects_locations_data_products_data_assets_delete | delete | projectsId, locationsId, dataProductsId, dataAssetsId | validateOnly, etag | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
dataAssetsId | string | |
dataProductsId | string | |
locationsId | string | |
projectsId | string | |
dataAssetId | string | |
etag | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean |
SELECT examples
- projects_locations_data_products_data_assets_get
- projects_locations_data_products_data_assets_list
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
;
Lists data assets for a given data product.
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 filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- projects_locations_data_products_data_assets_create
- Manifest
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
;
# Description fields are for documentation purposes
- name: data_assets
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the data_assets resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the data_assets resource.
- name: dataProductsId
value: "{{ dataProductsId }}"
description: Required parameter for the data_assets resource.
- name: etag
value: "{{ etag }}"
description: |
Optional. 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.
- name: labels
value: "{{ labels }}"
description: |
Optional. User-defined labels for the data asset.Example: { "environment": "production", "billing": "marketing-department" }
- name: accessGroupConfigs
value: "{{ accessGroupConfigs }}"
description: |
Optional. 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.
- name: name
value: "{{ name }}"
description: |
Identifier. Resource name of the data asset. Format: projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_id}/dataAssets/{data_asset_id}
- name: resource
value: "{{ resource }}"
description: |
Required. 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.
- name: dataAssetId
value: "{{ dataAssetId }}"
- name: validateOnly
value: {{ validateOnly }}
UPDATE examples
- projects_locations_data_products_data_assets_patch
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
- projects_locations_data_products_data_assets_delete
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 }}'
;