Skip to main content

examples

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

Overview​

Nameexamples
TypeResource
Idgoogle.translate.examples

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringOutput only. The resource name of the example, in form of projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}
sourceTextstringSentence in source language.
targetTextstringSentence in target language.
usagestringOutput only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_datasets_examples_listselectprojectsId, locationsId, datasetsIdfilter, pageSize, pageTokenLists sentence pairs in the dataset.

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
filterstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples​

Lists sentence pairs in the dataset.

SELECT
name,
sourceText,
targetText,
usage
FROM google.translate.examples
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND datasetsId = '{{ datasetsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
;