Skip to main content

saved_queries

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

Overview

Namesaved_queries
TypeResource
Idgoogle.aiplatform.saved_queries

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. Resource name of the SavedQuery.
annotationFilterstringOutput only. Filters on the Annotations in the dataset.
annotationSpecCountinteger (int32)Output only. Number of AnnotationSpecs in the context of the SavedQuery.
createTimestring (google-datetime)Output only. Timestamp when this SavedQuery was created.
displayNamestringRequired. The user-defined name of the SavedQuery. The name can be up to 128 characters long and can consist of any UTF-8 characters.
etagstringUsed to perform a consistent read-modify-write update. If not set, a blind "overwrite" update happens.
metadataanySome additional information about the SavedQuery.
problemTypestringRequired. Problem type of the SavedQuery. Allowed values: * IMAGE_CLASSIFICATION_SINGLE_LABEL * IMAGE_CLASSIFICATION_MULTI_LABEL * IMAGE_BOUNDING_POLY * IMAGE_BOUNDING_BOX * TEXT_CLASSIFICATION_SINGLE_LABEL * TEXT_CLASSIFICATION_MULTI_LABEL * TEXT_EXTRACTION * TEXT_SENTIMENT * VIDEO_CLASSIFICATION * VIDEO_OBJECT_TRACKING
supportAutomlTrainingbooleanOutput only. If the Annotations belonging to the SavedQuery can be used for AutoML training.
updateTimestring (google-datetime)Output only. Timestamp when SavedQuery was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectprojectsId, locationsId, datasetsIdfilter, pageSize, pageToken, readMask, orderByLists SavedQueries in a Dataset.
deletedeleteprojectsId, locationsId, datasetsId, savedQueriesIdDeletes a SavedQuery.

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
savedQueriesIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
readMaskstring (google-fieldmask)

SELECT examples

Lists SavedQueries in a Dataset.

SELECT
name,
annotationFilter,
annotationSpecCount,
createTime,
displayName,
etag,
metadata,
problemType,
supportAutomlTraining,
updateTime
FROM google.aiplatform.saved_queries
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND datasetsId = '{{ datasetsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND readMask = '{{ readMask }}'
AND orderBy = '{{ orderBy }}';

DELETE examples

Deletes a SavedQuery.

DELETE FROM google.aiplatform.saved_queries
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND datasetsId = '{{ datasetsId }}' --required
AND savedQueriesId = '{{ savedQueriesId }}' --required;