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:

Successful response

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, locationsIdpageSize, pageToken, filterList 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.
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.
exportexecprojectsId, locationsId, datasetsIdExport insights data to a destination defined in the request body.

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__name,
data__displayName,
data__description,
data__type,
data__ttl,
projectsId,
locationsId,
datasetId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ description }}',
'{{ type }}',
'{{ ttl }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ datasetId }}'
RETURNING
name,
createTime,
description,
displayName,
ttl,
type,
updateTime
;

UPDATE examples

Updates a dataset.

UPDATE google.contactcenterinsights.datasets
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__type = '{{ type }}',
data__ttl = '{{ ttl }}'
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

Upload feedback labels from an external source in bulk. Currently supports labeling Quality AI example conversations.

EXEC google.contactcenterinsights.datasets.bulk_upload_feedback_labels 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@datasetsId='{{ datasetsId }}' --required
@@json=
'{
"gcsSource": "{{ gcsSource }}",
"sheetsSource": "{{ sheetsSource }}",
"validateOnly": {{ validateOnly }}
}';