Method: projects.table.export

启动一个批处理流程,该流程会计算一个表并将结果写入多个目的地之一。

HTTP 请求

POST https://earthengine.googleapis.com/v1/{project=projects/*}/table:export

网址采用 gRPC 转码语法。

路径参数

参数
project

string

应被视为相应请求的服务使用方的 Google Cloud Platform 项目的项目 ID 或项目编号。格式为 projects/{project-id}

必须对指定的资源 project 具有以下 IAM 权限才能进行授权:

  • earthengine.exports.create

请求正文

请求正文中包含结构如下的数据:

JSON 表示法
{
  "expression": {
    object (Expression)
  },
  "description": string,
  "selectors": [
    string
  ],
  "requestId": string,
  "maxErrorMeters": number,
  "maxVertices": integer,
  "workloadTag": string,
  "priority": integer,

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "fileExportOptions": {
    object (TableFileExportOptions)
  },
  "assetExportOptions": {
    object (TableAssetExportOptions)
  },
  "featureViewExportOptions": {
    object (FeatureViewAssetExportOptions)
  },
  "bigqueryExportOptions": {
    object (BigQueryExportOptions)
  }
  // End of mutually exclusive fields.
}
字段
expression

object (Expression)

一种表达式,用于计算并导出表。

description

string

任务的人类可读名称。

selectors[]

string

要纳入结果中的列的显式列表。

requestId

string

用于检测重复请求的唯一字符串。如果同一用户使用相同的非空 requestId 发出多个请求,则只有其中一个请求可以成功启动长时间运行的操作。requestId 可以包含字符 a..z、A..Z、0-9 或“-”。requestId 的长度不得超过 60 个字符。

maxErrorMeters

number

在坐标系之间转换几何图形时允许的最大误差(以米为单位)。如果为空,则默认最大误差为 1 米。

maxVertices

integer

每个几何图形的未剪切顶点数上限;顶点数超过此上限的几何图形将被剪切成小于此大小的块。

workloadTag

string

用户提供的用于跟踪相应计算的标签。

priority

integer

可选。导出任务在项目中的优先级。优先级较高的任务会更早安排。必须是介于 0 到 9999 之间的整数。如果未设置,则默认为 100。

用于描述结果的存储位置和存储方式的选项。以下是互斥字段的列表。在响应中,最多只能设置一个字段:
fileExportOptions

object (TableFileExportOptions)

如果指定,则将导出配置为文件。

assetExportOptions

object (TableAssetExportOptions)

如果指定,则将导出配置为 Earth Engine 资源。

featureViewExportOptions

object (FeatureViewAssetExportOptions)

如果指定,则将导出配置为 FeatureView 地图。

bigqueryExportOptions

object (BigQueryExportOptions)

如果指定,则配置将表格数据导出到 BigQuery。

互斥字段的结束位置。

响应正文

如果成功,则响应正文包含一个 Operation 实例。

授权范围

需要以下 OAuth 范围之一:

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

如需了解详情,请参阅 OAuth 2.0 Overview

TableFileExportOptions

用于将表格导出为 Earth Engine 之外的文件的选项。

JSON 表示法
{
  "fileFormat": enum (TableFileFormat),

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "driveDestination": {
    object (DriveDestination)
  },
  "cloudStorageDestination": {
    object (CloudStorageDestination)
  }
  // End of mutually exclusive fields.
}
字段
fileFormat

enum (TableFileFormat)

导出表的格式。

结果的写入位置。以下是互斥字段的列表。在响应中,最多只能设置一个字段:
driveDestination

object (DriveDestination)

如果指定,则配置导出到 Google 云端硬盘。

cloudStorageDestination

object (CloudStorageDestination)

如果指定,则配置导出到 Google Cloud Storage。

互斥字段的结束位置。

TableAssetExportOptions

用于将表格另存为 Earth Engine 资产的选项。

JSON 表示法
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "earthEngineDestination": {
    object (EarthEngineDestination)
  }
  // End of mutually exclusive fields.
}
字段
结果的写入位置。以下是互斥字段的列表。在响应中,最多只能设置一个字段:
earthEngineDestination

object (EarthEngineDestination)

如果指定,则配置向 Earth Engine 的导出。

互斥字段的结束位置。

FeatureViewAssetExportOptions

用于将表格或 FeatureCollection 保存为 FeatureView 地图的选项。

JSON 表示法
{
  "ingestionTimeParameters": {
    object (FeatureViewIngestionTimeParameters)
  },

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "featureViewDestination": {
    object (FeatureViewDestination)
  }
  // End of mutually exclusive fields.
}
字段
ingestionTimeParameters

object (FeatureViewIngestionTimeParameters)

FeatureView 的提取时间参数。这些参数必须在提取时指定,并且无法实时更新。

结果的写入位置。以下是互斥字段的列表。在响应中,最多只能设置一个字段:
featureViewDestination

object (FeatureViewDestination)

如果指定,则配置导出到 FeatureView。

互斥字段的结束位置。

FeatureViewDestination

Earth Engine FeatureView 目的地的配置。

JSON 表示法
{
  "name": string,
  "assetVersion": integer
}
字段
name

string

必需。FeatureView 资产 ID。服务器会根据 ID 生成地图名称。

assetVersion

integer

要创建的 FeatureView 资产版本。用于为具有资产的版本设置别名。如果未设置,则使用 0。

BigQueryExportOptions

用于将表格数据导出到 BigQuery 的选项。

JSON 表示法
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "bigqueryDestination": {
    object (BigQueryDestination)
  }
  // End of mutually exclusive fields.
}
字段
数据写入位置。以下是互斥字段的列表。在响应中,最多只能设置一个字段:
bigqueryDestination

object (BigQueryDestination)

如果指定,则配置导出到 BigQuery。

互斥字段的结束位置。

BigQueryDestination

BigQuery 中目的地的配置。

JSON 表示法
{
  "table": string,
  "overwrite": boolean,
  "append": boolean
}
字段
table

string

必需。BigQuery 目标表引用,格式如下:“projectId.dataset_id.table_id”。

如果引用的资源不存在,系统会创建新表格。如果“append”和“overwrite”参数均为 false,则也适用此规则。

如果引用的资源存在且具有兼容的架构,则“overwrite”和“append”参数之一必须为 true,否则任务将失败。

如果引用的资源存在,但架构与现有架构不兼容,任务也会失败。

overwrite

boolean

指定如果表已存在且具有兼容的架构,是否应覆盖表数据。

overwriteappend 参数不能同时为 true

append

boolean

指定如果表已存在且具有兼容的架构,是否应附加表数据。

overwriteappend 参数不能同时为 true