data_products
Creates, updates, deletes, gets or lists a data_products resource.
Overview
| Name | data_products |
| Type | Resource |
| Id | google.dataplex.data_products |
Fields
The following fields are returned by SELECT queries:
- projects_locations_data_products_get
- projects_locations_data_products_list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Resource name of the data product. Format: projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_id}. |
accessApprovalConfig | object | Optional. Configuration for access approval for the data product. (id: GoogleCloudDataplexV1DataProductAccessApprovalConfig) |
accessGroups | object | Optional. 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" } } } |
assetCount | integer (int32) | Output only. Number of data assets associated with this data product. |
createTime | string (google-datetime) | Output only. The time at which the data product was created. |
description | string | Optional. Description of the data product. |
displayName | string | Required. User-friendly display name of the data product. |
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. |
icon | string (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. |
labels | object | Optional. User-defined labels for the data product.Example: { "environment": "production", "billing": "marketing-department" } |
ownerEmails | array | Required. Emails of the data product owners. |
uid | string | Output 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. |
updateTime | string (google-datetime) | Output only. The time at which the data product was last updated. |
| Name | Datatype | Description |
|---|
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
projects_locations_data_products_get | select | projectsId, locationsId, dataProductsId | Gets a data product. | |
projects_locations_data_products_list | select | projectsId, locationsId | pageToken, filter, pageSize, orderBy | Lists data products for a given project. |
projects_locations_data_products_create | insert | projectsId, locationsId | validateOnly, dataProductId | Creates a data product. |
projects_locations_data_products_patch | update | projectsId, locationsId, dataProductsId | updateMask, validateOnly | Updates a data product. |
projects_locations_data_products_delete | delete | projectsId, locationsId, dataProductsId | validateOnly, etag | Deletes 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_access | exec | projectsId, locationsId, dataProductsId | 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. |
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 |
|---|---|---|
dataProductsId | string | |
locationsId | string | |
projectsId | string | |
dataProductId | string | |
etag | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean |
SELECT examples
- projects_locations_data_products_get
- projects_locations_data_products_list
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
;
Lists data products for a given project.
SELECT
*
FROM google.dataplex.data_products
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND orderBy = '{{ orderBy }}'
;
INSERT examples
- projects_locations_data_products_create
- Manifest
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
;
# Description fields are for documentation purposes
- name: data_products
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the data_products resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the data_products resource.
- name: accessGroups
value: "{{ accessGroups }}"
description: |
Optional. 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" } } }
- name: labels
value: "{{ labels }}"
description: |
Optional. User-defined labels for the data product.Example: { "environment": "production", "billing": "marketing-department" }
- name: ownerEmails
value:
- "{{ ownerEmails }}"
description: |
Required. Emails of the data product owners.
- name: accessApprovalConfig
description: |
Optional. Configuration for access approval for the data product.
value:
approverEmails:
- "{{ approverEmails }}"
- name: description
value: "{{ description }}"
description: |
Optional. Description of the data product.
- 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: icon
value: "{{ icon }}"
description: |
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.
- name: displayName
value: "{{ displayName }}"
description: |
Required. User-friendly display name of the data product.
- name: name
value: "{{ name }}"
description: |
Identifier. Resource name of the data product. Format: projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_id}.
- name: validateOnly
value: {{ validateOnly }}
- name: dataProductId
value: "{{ dataProductId }}"
UPDATE examples
- projects_locations_data_products_patch
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
- projects_locations_data_products_delete
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
- projects_locations_data_products_request_access
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 }}"
}'
;