Skip to main content

examples

Creates, updates, deletes, gets or lists an examples resource.

Overview

Nameexamples
TypeResource
Idgoogle.datalabeling.examples

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. Name of the example, in format of: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id}/examples/{example_id}
annotationsarrayOutput only. Annotations for the piece of data in Example. One piece of data can have multiple annotations.
imagePayloadobjectThe image payload, a container of the image bytes/uri. (id: GoogleCloudDatalabelingV1beta1ImagePayload)
textPayloadobjectThe text payload, a container of the text content. (id: GoogleCloudDatalabelingV1beta1TextPayload)
videoPayloadobjectThe video payload, a container of the video uri. (id: GoogleCloudDatalabelingV1beta1VideoPayload)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_datasets_annotated_datasets_examples_getselectprojectsId, datasetsId, annotatedDatasetsId, examplesIdfilterGets an example by resource name, including both data and annotation.
projects_datasets_annotated_datasets_examples_listselectprojectsId, datasetsId, annotatedDatasetsIdfilter, pageSize, pageTokenLists examples in an annotated dataset. Pagination is supported.

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
annotatedDatasetsIdstring
datasetsIdstring
examplesIdstring
projectsIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets an example by resource name, including both data and annotation.

SELECT
name,
annotations,
imagePayload,
textPayload,
videoPayload
FROM google.datalabeling.examples
WHERE projectsId = '{{ projectsId }}' -- required
AND datasetsId = '{{ datasetsId }}' -- required
AND annotatedDatasetsId = '{{ annotatedDatasetsId }}' -- required
AND examplesId = '{{ examplesId }}' -- required
AND filter = '{{ filter }}';