adaptive_mt_datasets
Creates, updates, deletes, gets or lists an adaptive_mt_datasets
resource.
Overview
Name | adaptive_mt_datasets |
Type | Resource |
Id | google.translate.adaptive_mt_datasets |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_adaptive_mt_datasets_get
- projects_locations_adaptive_mt_datasets_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Required. The resource name of the dataset, in form of projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id} |
createTime | string (google-datetime) | Output only. Timestamp when this dataset was created. |
displayName | string | The 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. |
exampleCount | integer (int32) | The number of examples in the dataset. |
sourceLanguageCode | string | The BCP-47 language code of the source language. |
targetLanguageCode | string | The BCP-47 language code of the target language. |
updateTime | string (google-datetime) | Output only. Timestamp when this dataset was last updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Required. The resource name of the dataset, in form of projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id} |
createTime | string (google-datetime) | Output only. Timestamp when this dataset was created. |
displayName | string | The 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. |
exampleCount | integer (int32) | The number of examples in the dataset. |
sourceLanguageCode | string | The BCP-47 language code of the source language. |
targetLanguageCode | string | The BCP-47 language code of the target language. |
updateTime | string (google-datetime) | Output only. Timestamp when this dataset was last updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_adaptive_mt_datasets_get | select | projectsId , locationsId , adaptiveMtDatasetsId | Gets the Adaptive MT dataset. | |
projects_locations_adaptive_mt_datasets_list | select | projectsId , locationsId | pageSize , pageToken , filter | Lists all Adaptive MT datasets for which the caller has read permission. |
projects_locations_adaptive_mt_datasets_create | insert | projectsId , locationsId | Creates an Adaptive MT dataset. | |
projects_locations_adaptive_mt_datasets_delete | delete | projectsId , locationsId , adaptiveMtDatasetsId | Deletes an Adaptive MT dataset, including all its entries and associated metadata. | |
projects_locations_adaptive_mt_datasets_import_adaptive_mt_file | exec | projectsId , locationsId , adaptiveMtDatasetsId | Imports 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.
Name | Datatype | Description |
---|---|---|
adaptiveMtDatasetsId | string | |
locationsId | string | |
projectsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT
examples
- projects_locations_adaptive_mt_datasets_get
- projects_locations_adaptive_mt_datasets_list
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;
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 projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}';
INSERT
examples
- projects_locations_adaptive_mt_datasets_create
- Manifest
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
;
# Description fields are for documentation purposes
- name: adaptive_mt_datasets
props:
- name: projectsId
value: string
description: Required parameter for the adaptive_mt_datasets resource.
- name: locationsId
value: string
description: Required parameter for the adaptive_mt_datasets resource.
- name: name
value: string
description: >
Required. The resource name of the dataset, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}`
- name: displayName
value: string
description: >
The 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.
- name: sourceLanguageCode
value: string
description: >
The BCP-47 language code of the source language.
- name: targetLanguageCode
value: string
description: >
The BCP-47 language code of the target language.
- name: exampleCount
value: integer
description: >
The number of examples in the dataset.
DELETE
examples
- projects_locations_adaptive_mt_datasets_delete
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
- projects_locations_adaptive_mt_datasets_import_adaptive_mt_file
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 }}"
}';