Method: projects.locations.datasets.importData

Import sentence pairs into translation Dataset.

HTTP request

POST https://translate.googleapis.com/v3/{dataset=projects/*/locations/*/datasets/*}:importData

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
dataset

string

Required. Name of the dataset. In form of projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}

Request body

The request body contains data with the following structure:

JSON representation
 { 
 "inputConfig" 
 : 
 { 
 object (  DatasetInputConfig 
 
) 
 } 
 } 
Fields
inputConfig

object ( DatasetInputConfig )

Required. The config for the input content.

Response body

If successful, the response body contains an instance of Operation .

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-translation
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview .

DatasetInputConfig

Input configuration for datasets.

JSON representation
 { 
 "inputFiles" 
 : 
 [ 
 { 
 object (  InputFile 
 
) 
 } 
 ] 
 } 
Fields
inputFiles[]

object ( InputFile )

Files containing the sentence pairs to be imported to the dataset.

InputFile

An input file.

JSON representation
 { 
 "usage" 
 : 
 string 
 , 
 // Union field source 
can be only one of the following: 
 "gcsSource" 
 : 
 { 
 object (  GcsInputSource 
 
) 
 } 
 // End of list of possible types for union field source 
. 
 } 
Fields
usage

string

Optional. Usage of the file contents. Options are TRAIN|VALIDATION|TEST, or UNASSIGNED (by default) for auto split.

Union field source . Source of the file containing sentence pairs. Supported formats are tab-separated values (.tsv) and Translation Memory eXchange (.tmx) . source can be only one of the following:
gcsSource

object ( GcsInputSource )

Google Cloud Storage file source.

Create a Mobile Website
View Site in Mobile | Classic
Share by: