Method: projects.table.export

启动一个批处理过程,该过程会计算表并将结果写入多个目标位置之一。

HTTP 请求

POST https://earthengine.googleapis.com/v1alpha/{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)
  },
  "gcsDestination": {
    object (GcsDestination)
  }
  // End of mutually exclusive fields.
}
字段
fileFormat

enum (TableFileFormat)

导出表的文件格式。

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

object (DriveDestination)

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

cloudStorageDestination

object (CloudStorageDestination)

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

gcsDestination
(deprecated)

object (GcsDestination)

如果指定,则配置为导出到 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

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

overwrite 和 append 参数不能同时为 true。

append

boolean

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

overwrite 和 append 参数不能同时为 true。