Skip to main content

datasets

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

Overview

Namedatasets
TypeResource
Idgoogle.contactcenterinsights.datasets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringImmutable. Identifier. Resource name of the dataset. Format: projects/{project}/locations/{location}/datasets/{dataset}
createTimestring (google-datetime)Output only. Dataset create time.
descriptionstringDataset description.
displayNamestringDisplay name for the dataaset
ttlstring (google-duration)Optional. Option TTL for the dataset.
typestringDataset usage type.
updateTimestring (google-datetime)Output only. Dataset update time.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, datasetsIdGets a dataset.
listselectprojectsId, locationsIdpageToken, filter, pageSizeList datasets matching the input.
createinsertprojectsId, locationsIddatasetIdCreates a dataset.
patchupdateprojectsId, locationsId, datasetsIdupdateMaskUpdates a dataset.
deletedeleteprojectsId, locationsId, datasetsIdDelete a dataset.
bulk_delete_feedback_labelsdeleteprojectsId, locationsId, datasetsIdDelete feedback labels in bulk using a filter.
exportexecprojectsId, locationsId, datasetsIdExport insights data to a destination defined in the request body.
bulk_upload_feedback_labelsexecprojectsId, locationsId, datasetsIdUpload feedback labels from an external source in bulk. Currently supports labeling Quality AI example conversations.
bulk_download_feedback_labelsexecprojectsId, locationsId, datasetsIdDownload feedback labels in bulk from an external source. Currently supports exporting Quality AI example conversations with transcripts and question bodies.

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
datasetsIdstring
locationsIdstring
projectsIdstring
datasetIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets a dataset.

SELECT
name,
createTime,
description,
displayName,
ttl,
type,
updateTime
FROM google.contactcenterinsights.datasets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND datasetsId = '{{ datasetsId }}' -- required
;

INSERT examples

Creates a dataset.

INSERT INTO google.contactcenterinsights.datasets (
data__type,
data__ttl,
data__description,
data__name,
data__displayName,
projectsId,
locationsId,
datasetId
)
SELECT
'{{ type }}',
'{{ ttl }}',
'{{ description }}',
'{{ name }}',
'{{ displayName }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ datasetId }}'
RETURNING
name,
createTime,
description,
displayName,
ttl,
type,
updateTime
;

UPDATE examples

Updates a dataset.

UPDATE google.contactcenterinsights.datasets
SET
data__type = '{{ type }}',
data__ttl = '{{ ttl }}',
data__description = '{{ description }}',
data__name = '{{ name }}',
data__displayName = '{{ displayName }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND datasetsId = '{{ datasetsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
createTime,
description,
displayName,
ttl,
type,
updateTime;

DELETE examples

Delete a dataset.

DELETE FROM google.contactcenterinsights.datasets
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND datasetsId = '{{ datasetsId }}' --required
;

Lifecycle Methods

Export insights data to a destination defined in the request body.

EXEC google.contactcenterinsights.datasets.export 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@datasetsId='{{ datasetsId }}' --required
@@json=
'{
"filter": "{{ filter }}",
"kmsKey": "{{ kmsKey }}",
"exportSchemaVersion": "{{ exportSchemaVersion }}",
"bigQueryDestination": "{{ bigQueryDestination }}",
"writeDisposition": "{{ writeDisposition }}",
"parent": "{{ parent }}"
}'
;