Skip to main content

parallel_datas

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

Overview

Nameparallel_datas
TypeResource
Idaws.translate.parallel_datas

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
auxiliary_data_locationobjectThe Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to create a parallel data resource. The location is returned as a presigned URL to that has a 30-minute expiration.
data_locationobjectThe Amazon S3 location of the most recent parallel data input file that was successfully imported into Amazon Translate. The location is returned as a presigned URL that has a 30-minute expiration. Amazon Translate doesn't scan all input files for the risk of CSV injection attacks. CSV injection occurs when a .csv or .tsv file is altered so that a record contains malicious code. The record begins with a special character, such as =, +, -, or @. When the file is opened in a spreadsheet program, the program might interpret the record as a formula and run the code within it. Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.
latest_update_attempt_auxiliary_data_locationobjectThe Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to update a parallel data resource. The location is returned as a presigned URL to that has a 30-minute expiration.
parallel_data_propertiesobjectThe properties of the parallel data resource that is being retrieved.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_parallel_dataselectregionProvides information about a parallel data resource.
create_parallel_datainsertregion, ParallelDataConfig, ClientTokenCreates a parallel data resource in Amazon Translate by importing an input file from Amazon S3. Parallel data files contain examples that show how you want segments of text to be translated. By adding parallel data, you can influence the style, tone, and word choice in your translation output.
update_parallel_dataupdateregion, ParallelDataConfig, ClientTokenUpdates a previously created parallel data resource by importing a new input file from Amazon S3.
delete_parallel_datadeleteregionDeletes a parallel data resource in Amazon Translate.
list_parallel_dataexecregionProvides a list of your parallel data resources in Amazon Translate.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Provides information about a parallel data resource.

SELECT
auxiliary_data_location,
data_location,
latest_update_attempt_auxiliary_data_location,
parallel_data_properties
FROM aws.translate.parallel_datas
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3. Parallel data files contain examples that show how you want segments of text to be translated. By adding parallel data, you can influence the style, tone, and word choice in your translation output.

INSERT INTO aws.translate.parallel_datas (
Name,
Description,
ParallelDataConfig,
EncryptionKey,
ClientToken,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ ParallelDataConfig }}' /* required */,
'{{ EncryptionKey }}',
'{{ ClientToken }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
name,
status
;

UPDATE examples

Updates a previously created parallel data resource by importing a new input file from Amazon S3.

UPDATE aws.translate.parallel_datas
SET
Name = '{{ Name }}',
Description = '{{ Description }}',
ParallelDataConfig = '{{ ParallelDataConfig }}',
ClientToken = '{{ ClientToken }}'
WHERE
region = '{{ region }}' --required
AND ParallelDataConfig = '{{ ParallelDataConfig }}' --required
AND ClientToken = '{{ ClientToken }}' --required
RETURNING
latest_update_attempt_at,
latest_update_attempt_status,
name,
status;

DELETE examples

Deletes a parallel data resource in Amazon Translate.

DELETE FROM aws.translate.parallel_datas
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Provides a list of your parallel data resources in Amazon Translate.

EXEC aws.translate.parallel_datas.list_parallel_data
@region='{{ region }}' --required
@@json=
'{
"NextToken": "{{ NextToken }}",
"MaxResults": {{ MaxResults }}
}'
;