Skip to main content

data_exchanges

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

Overview

Namedata_exchanges
TypeResource
Idgoogle.analyticshub.data_exchanges

Fields

NameDatatypeDescription
namestringOutput only. The resource name of the data exchange. e.g. projects/myproject/locations/US/dataExchanges/123.
descriptionstringOptional. 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.
discoveryTypestringOptional. 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.
displayNamestringRequired. 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.
documentationstringOptional. Documentation describing the data exchange.
iconstringOptional. 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.
listingCountintegerOutput only. Number of listings contained in the data exchange.
primaryContactstringOptional. Email or URL of the primary point of contact of the data exchange. Max Length: 1000 bytes.
sharingEnvironmentConfigobjectSharing environment is a behavior model for sharing data within a data exchange. This option is configurable for a data exchange.

Methods

NameAccessible byRequired ParamsDescription
organizations_locations_data_exchanges_listSELECTlocationsId, organizationsIdLists all data exchanges from projects in a given organization and location.
projects_locations_data_exchanges_getSELECTdataExchangesId, locationsId, projectsIdGets the details of a data exchange.
projects_locations_data_exchanges_listSELECTlocationsId, projectsIdLists all data exchanges in a given project and location.
projects_locations_data_exchanges_createINSERTlocationsId, projectsIdCreates a new data exchange.
projects_locations_data_exchanges_deleteDELETEdataExchangesId, locationsId, projectsIdDeletes an existing data exchange.
projects_locations_data_exchanges_patchUPDATEdataExchangesId, locationsId, projectsIdUpdates an existing data exchange.
projects_locations_data_exchanges_subscribeEXECdataExchangesId, locationsId, projectsIdCreates 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.

/*+ 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 }}'
;

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 }}';