data_exchanges
Creates, updates, deletes, gets or lists a data_exchanges
resource.
Overview
Name | data_exchanges |
Type | Resource |
Id | google.analyticshub.data_exchanges |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_data_exchanges_get
- projects_locations_data_exchanges_list
- organizations_locations_data_exchanges_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the data exchange. e.g. projects/myproject/locations/us/dataExchanges/123 . |
description | string | Optional. Description of the data exchange. The description must not contain Unicode non-characters as well as C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default value is an empty string. Max length: 2000 bytes. |
discoveryType | string | Optional. Type of discovery on the discovery page for all the listings under this exchange. Updating this field also updates (overwrites) the discovery_type field for all the listings under this exchange. |
displayName | string | Required. Human-readable display name of the data exchange. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and must not start or end with spaces. Default value is an empty string. Max length: 63 bytes. |
documentation | string | Optional. Documentation describing the data exchange. |
icon | string (byte) | Optional. Base64 encoded image representing the data exchange. 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. |
listingCount | integer (int32) | Output only. Number of listings contained in the data exchange. |
logLinkedDatasetQueryUserEmail | boolean | Optional. By default, false. If true, the DataExchange has an email sharing mandate enabled. |
primaryContact | string | Optional. Email or URL of the primary point of contact of the data exchange. Max Length: 1000 bytes. |
sharingEnvironmentConfig | object | Optional. Configurable data sharing environment option for a data exchange. (id: SharingEnvironmentConfig) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the data exchange. e.g. projects/myproject/locations/us/dataExchanges/123 . |
description | string | Optional. Description of the data exchange. The description must not contain Unicode non-characters as well as C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default value is an empty string. Max length: 2000 bytes. |
discoveryType | string | Optional. Type of discovery on the discovery page for all the listings under this exchange. Updating this field also updates (overwrites) the discovery_type field for all the listings under this exchange. |
displayName | string | Required. Human-readable display name of the data exchange. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and must not start or end with spaces. Default value is an empty string. Max length: 63 bytes. |
documentation | string | Optional. Documentation describing the data exchange. |
icon | string (byte) | Optional. Base64 encoded image representing the data exchange. 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. |
listingCount | integer (int32) | Output only. Number of listings contained in the data exchange. |
logLinkedDatasetQueryUserEmail | boolean | Optional. By default, false. If true, the DataExchange has an email sharing mandate enabled. |
primaryContact | string | Optional. Email or URL of the primary point of contact of the data exchange. Max Length: 1000 bytes. |
sharingEnvironmentConfig | object | Optional. Configurable data sharing environment option for a data exchange. (id: SharingEnvironmentConfig) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the data exchange. e.g. projects/myproject/locations/us/dataExchanges/123 . |
description | string | Optional. Description of the data exchange. The description must not contain Unicode non-characters as well as C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default value is an empty string. Max length: 2000 bytes. |
discoveryType | string | Optional. Type of discovery on the discovery page for all the listings under this exchange. Updating this field also updates (overwrites) the discovery_type field for all the listings under this exchange. |
displayName | string | Required. Human-readable display name of the data exchange. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and must not start or end with spaces. Default value is an empty string. Max length: 63 bytes. |
documentation | string | Optional. Documentation describing the data exchange. |
icon | string (byte) | Optional. Base64 encoded image representing the data exchange. 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. |
listingCount | integer (int32) | Output only. Number of listings contained in the data exchange. |
logLinkedDatasetQueryUserEmail | boolean | Optional. By default, false. If true, the DataExchange has an email sharing mandate enabled. |
primaryContact | string | Optional. Email or URL of the primary point of contact of the data exchange. Max Length: 1000 bytes. |
sharingEnvironmentConfig | object | Optional. Configurable data sharing environment option for a data exchange. (id: SharingEnvironmentConfig) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_data_exchanges_get | select | projectsId , locationsId , dataExchangesId | Gets the details of a data exchange. | |
projects_locations_data_exchanges_list | select | projectsId , locationsId | pageSize , pageToken | Lists all data exchanges in a given project and location. |
organizations_locations_data_exchanges_list | select | organizationsId , locationsId | pageSize , pageToken | Lists all data exchanges from projects in a given organization and location. |
projects_locations_data_exchanges_create | insert | projectsId , locationsId | dataExchangeId | Creates a new data exchange. |
projects_locations_data_exchanges_patch | update | projectsId , locationsId , dataExchangesId | updateMask | Updates an existing data exchange. |
projects_locations_data_exchanges_delete | delete | projectsId , locationsId , dataExchangesId | Deletes an existing data exchange. | |
projects_locations_data_exchanges_subscribe | exec | projectsId , locationsId , dataExchangesId | Creates a Subscription to a Data Clean Room. This is a long-running operation as it will create one or more linked datasets. Throws a Bad Request error if the Data Exchange does not contain any listings. |
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 |
---|---|---|
dataExchangesId | string | |
locationsId | string | |
organizationsId | string | |
projectsId | string | |
dataExchangeId | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_locations_data_exchanges_get
- projects_locations_data_exchanges_list
- organizations_locations_data_exchanges_list
Gets the details of a data exchange.
SELECT
name,
description,
discoveryType,
displayName,
documentation,
icon,
listingCount,
logLinkedDatasetQueryUserEmail,
primaryContact,
sharingEnvironmentConfig
FROM google.analyticshub.data_exchanges
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND dataExchangesId = '{{ dataExchangesId }}' -- required;
Lists all data exchanges in a given project and location.
SELECT
name,
description,
discoveryType,
displayName,
documentation,
icon,
listingCount,
logLinkedDatasetQueryUserEmail,
primaryContact,
sharingEnvironmentConfig
FROM google.analyticshub.data_exchanges
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
Lists all data exchanges from projects in a given organization and location.
SELECT
name,
description,
discoveryType,
displayName,
documentation,
icon,
listingCount,
logLinkedDatasetQueryUserEmail,
primaryContact,
sharingEnvironmentConfig
FROM google.analyticshub.data_exchanges
WHERE organizationsId = '{{ organizationsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- projects_locations_data_exchanges_create
- Manifest
Creates a new data exchange.
INSERT INTO google.analyticshub.data_exchanges (
data__displayName,
data__description,
data__primaryContact,
data__documentation,
data__icon,
data__sharingEnvironmentConfig,
data__discoveryType,
data__logLinkedDatasetQueryUserEmail,
projectsId,
locationsId,
dataExchangeId
)
SELECT
'{{ displayName }}',
'{{ description }}',
'{{ primaryContact }}',
'{{ documentation }}',
'{{ icon }}',
'{{ sharingEnvironmentConfig }}',
'{{ discoveryType }}',
{{ logLinkedDatasetQueryUserEmail }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ dataExchangeId }}'
RETURNING
name,
description,
discoveryType,
displayName,
documentation,
icon,
listingCount,
logLinkedDatasetQueryUserEmail,
primaryContact,
sharingEnvironmentConfig
;
# Description fields are for documentation purposes
- name: data_exchanges
props:
- name: projectsId
value: string
description: Required parameter for the data_exchanges resource.
- name: locationsId
value: string
description: Required parameter for the data_exchanges resource.
- name: displayName
value: string
description: >
Required. Human-readable display name of the data exchange. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and must not start or end with spaces. Default value is an empty string. Max length: 63 bytes.
- name: description
value: string
description: >
Optional. Description of the data exchange. The description must not contain Unicode non-characters as well as C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default value is an empty string. Max length: 2000 bytes.
- name: primaryContact
value: string
description: >
Optional. Email or URL of the primary point of contact of the data exchange. Max Length: 1000 bytes.
- name: documentation
value: string
description: >
Optional. Documentation describing the data exchange.
- name: icon
value: string
description: >
Optional. Base64 encoded image representing the data exchange. 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: sharingEnvironmentConfig
value: object
description: >
Optional. Configurable data sharing environment option for a data exchange.
- name: discoveryType
value: string
description: >
Optional. Type of discovery on the discovery page for all the listings under this exchange. Updating this field also updates (overwrites) the discovery_type field for all the listings under this exchange.
valid_values: ['DISCOVERY_TYPE_UNSPECIFIED', 'DISCOVERY_TYPE_PRIVATE', 'DISCOVERY_TYPE_PUBLIC']
- name: logLinkedDatasetQueryUserEmail
value: boolean
description: >
Optional. By default, false. If true, the DataExchange has an email sharing mandate enabled.
- name: dataExchangeId
value: string
UPDATE
examples
- projects_locations_data_exchanges_patch
Updates an existing data exchange.
UPDATE google.analyticshub.data_exchanges
SET
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__primaryContact = '{{ primaryContact }}',
data__documentation = '{{ documentation }}',
data__icon = '{{ icon }}',
data__sharingEnvironmentConfig = '{{ sharingEnvironmentConfig }}',
data__discoveryType = '{{ discoveryType }}',
data__logLinkedDatasetQueryUserEmail = {{ logLinkedDatasetQueryUserEmail }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dataExchangesId = '{{ dataExchangesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
description,
discoveryType,
displayName,
documentation,
icon,
listingCount,
logLinkedDatasetQueryUserEmail,
primaryContact,
sharingEnvironmentConfig;
DELETE
examples
- projects_locations_data_exchanges_delete
Deletes an existing data exchange.
DELETE FROM google.analyticshub.data_exchanges
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dataExchangesId = '{{ dataExchangesId }}' --required;
Lifecycle Methods
- projects_locations_data_exchanges_subscribe
Creates a Subscription to a Data Clean Room. This is a long-running operation as it will create one or more linked datasets. Throws a Bad Request error if the Data Exchange does not contain any listings.
EXEC google.analyticshub.data_exchanges.projects_locations_data_exchanges_subscribe
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@dataExchangesId='{{ dataExchangesId }}' --required
@@json=
'{
"destination": "{{ destination }}",
"destinationDataset": "{{ destinationDataset }}",
"subscription": "{{ subscription }}",
"subscriberContact": "{{ subscriberContact }}"
}';