data_exchanges
Creates, updates, deletes, gets or lists a data_exchanges
resource.
Overview
Name | data_exchanges |
Type | Resource |
Id | google.analyticshub.data_exchanges |
Fields
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 | 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 | Output only. Number of listings contained in the data exchange. |
primaryContact | string | Optional. Email or URL of the primary point of contact of the data exchange. Max Length: 1000 bytes. |
sharingEnvironmentConfig | object | Sharing environment is a behavior model for sharing data within a data exchange. This option is configurable for a data exchange. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
organizations_locations_data_exchanges_list | SELECT | locationsId, organizationsId | Lists all data exchanges from projects in a given organization and location. |
projects_locations_data_exchanges_get | SELECT | dataExchangesId, locationsId, projectsId | Gets the details of a data exchange. |
projects_locations_data_exchanges_list | SELECT | locationsId, projectsId | Lists all data exchanges in a given project and location. |
projects_locations_data_exchanges_create | INSERT | locationsId, projectsId | Creates a new data exchange. |
projects_locations_data_exchanges_delete | DELETE | dataExchangesId, locationsId, projectsId | Deletes an existing data exchange. |
projects_locations_data_exchanges_patch | UPDATE | dataExchangesId, locationsId, projectsId | Updates an existing data exchange. |
projects_locations_data_exchanges_subscribe | EXEC | dataExchangesId, locationsId, projectsId | Creates a Subscription to a Data Clean Room. This is a long-running operation as it will create one or more linked datasets. |
SELECT
examples
Lists all data exchanges in a given project and location.
SELECT
name,
description,
discoveryType,
displayName,
documentation,
icon,
listingCount,
primaryContact,
sharingEnvironmentConfig
FROM google.analyticshub.data_exchanges
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new data_exchanges
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.analyticshub.data_exchanges (
locationsId,
projectsId,
displayName,
description,
primaryContact,
documentation,
icon,
sharingEnvironmentConfig,
discoveryType
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ displayName }}',
'{{ description }}',
'{{ primaryContact }}',
'{{ documentation }}',
'{{ icon }}',
'{{ sharingEnvironmentConfig }}',
'{{ discoveryType }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: displayName
value: string
- name: description
value: string
- name: primaryContact
value: string
- name: documentation
value: string
- name: listingCount
value: integer
- name: icon
value: string
- name: sharingEnvironmentConfig
value:
- name: defaultExchangeConfig
value: []
- name: dcrExchangeConfig
value:
- name: singleSelectedResourceSharingRestriction
value: boolean
- name: singleLinkedDatasetPerCleanroom
value: boolean
- name: discoveryType
value: string
UPDATE
example
Updates a data_exchanges
resource.
/*+ update */
UPDATE google.analyticshub.data_exchanges
SET
displayName = '{{ displayName }}',
description = '{{ description }}',
primaryContact = '{{ primaryContact }}',
documentation = '{{ documentation }}',
icon = '{{ icon }}',
sharingEnvironmentConfig = '{{ sharingEnvironmentConfig }}',
discoveryType = '{{ discoveryType }}'
WHERE
dataExchangesId = '{{ dataExchangesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified data_exchanges
resource.
/*+ delete */
DELETE FROM google.analyticshub.data_exchanges
WHERE dataExchangesId = '{{ dataExchangesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';