Skip to main content

adaptive_mt_datasets

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

Overview

Nameadaptive_mt_datasets
TypeResource
Idgoogle.translate.adaptive_mt_datasets

Fields

NameDatatypeDescription
namestringRequired. The resource name of the dataset, in form of projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}
createTimestringOutput 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.
exampleCountintegerThe number of examples in the dataset.
sourceLanguageCodestringThe BCP-47 language code of the source language.
targetLanguageCodestringThe BCP-47 language code of the target language.
updateTimestringOutput only. Timestamp when this dataset was last updated.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_adaptive_mt_datasets_getSELECTadaptiveMtDatasetsId, locationsId, projectsIdGets the Adaptive MT dataset.
projects_locations_adaptive_mt_datasets_listSELECTlocationsId, projectsIdLists all Adaptive MT datasets for which the caller has read permission.
projects_locations_adaptive_mt_datasets_createINSERTlocationsId, projectsIdCreates an Adaptive MT dataset.
projects_locations_adaptive_mt_datasets_deleteDELETEadaptiveMtDatasetsId, locationsId, projectsIdDeletes an Adaptive MT dataset, including all its entries and associated metadata.
projects_locations_adaptive_mt_datasets_import_adaptive_mt_fileEXECadaptiveMtDatasetsId, locationsId, projectsIdImports an AdaptiveMtFile and adds all of its sentences into the AdaptiveMtDataset.

SELECT examples

Lists all Adaptive MT datasets for which the caller has read permission.

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

INSERT example

Use the following StackQL query and manifest file to create a new adaptive_mt_datasets resource.

/*+ create */
INSERT INTO google.translate.adaptive_mt_datasets (
locationsId,
projectsId,
name,
displayName,
sourceLanguageCode,
targetLanguageCode,
exampleCount
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}',
'{{ sourceLanguageCode }}',
'{{ targetLanguageCode }}',
'{{ exampleCount }}'
;

DELETE example

Deletes the specified adaptive_mt_datasets resource.

/*+ delete */
DELETE FROM google.translate.adaptive_mt_datasets
WHERE adaptiveMtDatasetsId = '{{ adaptiveMtDatasetsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';