Method: projects.locations.datasets.exportData

Exports dataset's data to the provided output location. Returns an empty response in the response field when it completes.

HTTP request

POST https://automl.googleapis.com/v1beta1/{name}:exportData

Path parameters

Parameters
name

string

Required. The resource name of the dataset.

Authorization requires the following Google IAM permission on the specified resource name:

  • automl.datasets.export

Request body

The request body contains data with the following structure:

JSON representation
{
  "outputConfig": {
    object (OutputConfig)
  }
}
Fields
outputConfig

object (OutputConfig)

Required. The desired output location.

Response body

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

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.

OutputConfig

Output configuration for datasets.exportData.

You can specify an output destination of either Google Cloud Storage or BigQuery.

Exporting to Google Cloud Storage

You can specify the path to your Google Cloud Storage output URI using the gcsDestination field.

The outputs correspond to how the data was imported, and may be used as input to import data. The output formats are represented as EBNF with literal commas and same non-terminal symbol definitions as in InputConfig, which is a CSV file(s) with each line in format:

ML_USE,GCS_FILE_PATH
  • ML_USE - Identifies the data set that the current row (file) applies to. This value can be one of the following:

    • TRAIN - Rows in this file are used to train the model.
    • TEST - Rows in this file are used to test the model during training.
    • UNASSIGNED - Rows in this file are not categorized. They are Automatically divided into train and test data. 80% for training and 20% for testing.
  • GCS_FILE_PATH - a Identifies JSON Lines (.JSONL) file stored in Google Cloud Storage that contains in-line text in-line as documents for model training.

The exported CSV file(s) are named tables_1.csv, tables_2.csv,..., tables_N.csv. Each exported file has a header line with the column names for the table, and the remaining lines in the CSV file contain a row of values for each respective column.

Exporting to BigQuery

You can specify the path to your BigQuery project output URI using the bigqueryDestination field.

AutoML Tables creates a new dataset in the specified project with a name in the format export_data_<automl-dataset-display-name>_<timestamp-of-export-call>. <automl-dataset-display-name> is a data set name compatible with BigQuery naming (for example, most special characters are replaced with underscores) <timestamp-of-export-call> is in YYYY_MM_DDThh_mm_ss_sssZ format based on ISO-8601.

The dataset has a table called primary_table that is filled with the data that was imported into the AutoML Tables dataset.

JSON representation
{

  // Union field destination can be only one of the following:
  "gcsDestination": {
    object (GcsDestination)
  },
  "bigqueryDestination": {
    object (BigQueryDestination)
  }
  // End of list of possible types for union field destination.
}
Fields
Union field destination. Required. The destination of the output. destination can be only one of the following:
gcsDestination

object (GcsDestination)

The Google Cloud Storage location where the output is to be written to. In the given directory a new directory will be created with name: export_data-<dataset-display-name>-<timestamp-of-export-call> where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export output will be written into that directory.

Exported data is written as CSV file(s) named tables_1.csv, tables_2.csv,...,tables_N.csv. Each exported file has a header line with the column names for the table, and the remaining lines in the CSV file contain a row of values for each respective column.

bigqueryDestination

object (BigQueryDestination)

The BigQuery location where the output is to be written to.

هل كانت هذه الصفحة مفيدة؟ يرجى تقييم أدائنا:

إرسال تعليقات حول...