Skip to main content

adaptive_mt_datasets

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

Overview

Nameadaptive_mt_datasets
TypeResource
Idgoogle.translate.adaptive_mt_datasets

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringRequired. The resource name of the dataset, in form of projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}
createTimestring (google-datetime)Output only. Timestamp when this dataset was created.
displayNamestringThe name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.
exampleCountinteger (int32)The number of examples in the dataset.
sourceLanguageCodestringThe BCP-47 language code of the source language.
targetLanguageCodestringThe BCP-47 language code of the target language.
updateTimestring (google-datetime)Output only. Timestamp when this dataset was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_adaptive_mt_datasets_getselectprojectsId, locationsId, adaptiveMtDatasetsIdGets the Adaptive MT dataset.
projects_locations_adaptive_mt_datasets_listselectprojectsId, locationsIdpageSize, pageToken, filterLists all Adaptive MT datasets for which the caller has read permission.
projects_locations_adaptive_mt_datasets_createinsertprojectsId, locationsIdCreates an Adaptive MT dataset.
projects_locations_adaptive_mt_datasets_deletedeleteprojectsId, locationsId, adaptiveMtDatasetsIdDeletes an Adaptive MT dataset, including all its entries and associated metadata.
projects_locations_adaptive_mt_datasets_import_adaptive_mt_fileexecprojectsId, locationsId, adaptiveMtDatasetsIdImports an AdaptiveMtFile and adds all of its sentences into the AdaptiveMtDataset.

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

SELECT examples

Gets the Adaptive MT dataset.

SELECT
name,
createTime,
displayName,
exampleCount,
sourceLanguageCode,
targetLanguageCode,
updateTime
FROM google.translate.adaptive_mt_datasets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND adaptiveMtDatasetsId = '{{ adaptiveMtDatasetsId }}' -- required;

INSERT examples

Creates an Adaptive MT dataset.

INSERT INTO google.translate.adaptive_mt_datasets (
data__name,
data__displayName,
data__sourceLanguageCode,
data__targetLanguageCode,
data__exampleCount,
projectsId,
locationsId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ sourceLanguageCode }}',
'{{ targetLanguageCode }}',
{{ exampleCount }},
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
createTime,
displayName,
exampleCount,
sourceLanguageCode,
targetLanguageCode,
updateTime
;

DELETE examples

Deletes an Adaptive MT dataset, including all its entries and associated metadata.

DELETE FROM google.translate.adaptive_mt_datasets
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND adaptiveMtDatasetsId = '{{ adaptiveMtDatasetsId }}' --required;

Lifecycle Methods

Imports an AdaptiveMtFile and adds all of its sentences into the AdaptiveMtDataset.

EXEC google.translate.adaptive_mt_datasets.projects_locations_adaptive_mt_datasets_import_adaptive_mt_file 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@adaptiveMtDatasetsId='{{ adaptiveMtDatasetsId }}' --required
@@json=
'{
"fileInputSource": "{{ fileInputSource }}",
"gcsInputSource": "{{ gcsInputSource }}"
}';