Skip to main content

data_products

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

Overview

Namedata_products
TypeResource
Idgoogle.dataplex.data_products

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. Resource name of the data product. Format: projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_id}.
accessApprovalConfigobjectOptional. Configuration for access approval for the data product. (id: GoogleCloudDataplexV1DataProductAccessApprovalConfig)
accessGroupsobjectOptional. Data product access groups by access group id as key. If data product is used only for packaging data assets, then access groups may be empty. However, if a data product is used for sharing data assets, then at least one access group must be specified.Example: { "analyst": { "id": "analyst", "displayName": "Analyst", "description": "Access group for analysts", "principal": { "googleGroup": "analysts@example.com" } } }
assetCountinteger (int32)Output only. Number of data assets associated with this data product.
createTimestring (google-datetime)Output only. The time at which the data product was created.
descriptionstringOptional. Description of the data product.
displayNamestringRequired. User-friendly display name of the data product.
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.
iconstring (byte)Optional. Base64 encoded image representing the data product. Max Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API only performs validation on size of the encoded data. Note: For byte fields, the content of the fields are base64-encoded (which increases the size of the data by 33-36%) when using JSON on the wire.
labelsobjectOptional. User-defined labels for the data product.Example: { "environment": "production", "billing": "marketing-department" }
ownerEmailsarrayRequired. Emails of the data product owners.
uidstringOutput only. System generated unique ID for the data product. This ID will be different if the data product is deleted and re-created with the same name.
updateTimestring (google-datetime)Output only. The time at which the data product was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_data_products_getselectprojectsId, locationsId, dataProductsIdGets a data product.
projects_locations_data_products_listselectprojectsId, locationsIdpageToken, filter, pageSize, orderByLists data products for a given project.
projects_locations_data_products_createinsertprojectsId, locationsIdvalidateOnly, dataProductIdCreates a data product.
projects_locations_data_products_patchupdateprojectsId, locationsId, dataProductsIdupdateMask, validateOnlyUpdates a data product.
projects_locations_data_products_deletedeleteprojectsId, locationsId, dataProductsIdvalidateOnly, etagDeletes a data product. The deletion will fail if the data product is not empty (i.e. contains at least one data asset).
projects_locations_data_products_request_accessexecprojectsId, locationsId, dataProductsIdRequests access to a data product. This will trigger an access approval workflow, and the requester will need to wait for the approval to be granted before they will be able to access the data product assets.

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
dataProductsIdstring
locationsIdstring
projectsIdstring
dataProductIdstring
etagstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)
validateOnlyboolean

SELECT examples

Gets a data product.

SELECT
name,
accessApprovalConfig,
accessGroups,
assetCount,
createTime,
description,
displayName,
etag,
icon,
labels,
ownerEmails,
uid,
updateTime
FROM google.dataplex.data_products
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND dataProductsId = '{{ dataProductsId }}' -- required
;

INSERT examples

Creates a data product.

INSERT INTO google.dataplex.data_products (
data__accessGroups,
data__labels,
data__ownerEmails,
data__accessApprovalConfig,
data__description,
data__etag,
data__icon,
data__displayName,
data__name,
projectsId,
locationsId,
validateOnly,
dataProductId
)
SELECT
'{{ accessGroups }}',
'{{ labels }}',
'{{ ownerEmails }}',
'{{ accessApprovalConfig }}',
'{{ description }}',
'{{ etag }}',
'{{ icon }}',
'{{ displayName }}',
'{{ name }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ validateOnly }}',
'{{ dataProductId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates a data product.

UPDATE google.dataplex.data_products
SET
data__accessGroups = '{{ accessGroups }}',
data__labels = '{{ labels }}',
data__ownerEmails = '{{ ownerEmails }}',
data__accessApprovalConfig = '{{ accessApprovalConfig }}',
data__description = '{{ description }}',
data__etag = '{{ etag }}',
data__icon = '{{ icon }}',
data__displayName = '{{ displayName }}',
data__name = '{{ name }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dataProductsId = '{{ dataProductsId }}' --required
AND updateMask = '{{ updateMask}}'
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a data product. The deletion will fail if the data product is not empty (i.e. contains at least one data asset).

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

Lifecycle Methods

Requests access to a data product. This will trigger an access approval workflow, and the requester will need to wait for the approval to be granted before they will be able to access the data product assets.

EXEC google.dataplex.data_products.projects_locations_data_products_request_access
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@dataProductsId='{{ dataProductsId }}' --required
@@json=
'{
"validateOnly": {{ validateOnly }},
"changeRequest": "{{ changeRequest }}"
}'
;