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,

  // Union field export_options can be only one of the following:
  "fileExportOptions": {
    object (TableFileExportOptions)
  },
  "assetExportOptions": {
    object (TableAssetExportOptions)
  },
  "featureViewExportOptions": {
    object (FeatureViewAssetExportOptions)
  },
  "bigqueryExportOptions": {
    object (BigQueryExportOptions)
  }
  // End of list of possible types for union field export_options.
}
字段
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。

联合字段 export_options。用于描述结果的存储位置和方式的选项。export_options 只能是下列其中一项:
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),

  // Union field destination can be only one of the following:
  "driveDestination": {
    object (DriveDestination)
  },
  "cloudStorageDestination": {
    object (CloudStorageDestination)
  },
  "gcsDestination": {
    object (GcsDestination)
  }
  // End of list of possible types for union field destination.
}
字段
fileFormat

enum (TableFileFormat)

导出表的文件格式。

联合字段 destination。写入结果的位置。destination 只能是下列其中一项:
driveDestination

object (DriveDestination)

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

cloudStorageDestination

object (CloudStorageDestination)

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

gcsDestination
(deprecated)

object (GcsDestination)

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

TableAssetExportOptions

将表保存为 Earth Engine 资产的选项。

JSON 表示法
{

  // Union field destination can be only one of the following:
  "earthEngineDestination": {
    object (EarthEngineDestination)
  }
  // End of list of possible types for union field destination.
}
字段
联合字段 destination。写入结果的位置。destination 只能是下列其中一项:
earthEngineDestination

object (EarthEngineDestination)

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

FeatureViewAssetExportOptions

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

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

  // Union field destination can be only one of the following:
  "featureViewDestination": {
    object (FeatureViewDestination)
  }
  // End of list of possible types for union field destination.
}
字段
ingestionTimeParameters

object (FeatureViewIngestionTimeParameters)

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

联合字段 destination。写入结果的位置。destination 只能是下列其中一项:
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 表示法
{

  // Union field destination can be only one of the following:
  "bigqueryDestination": {
    object (BigQueryDestination)
  }
  // End of list of possible types for union field destination.
}
字段
联合字段 destination。数据的写入位置。destination 只能是下列其中一项:
bigqueryDestination

object (BigQueryDestination)

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

BigQueryDestination

BigQuery 中目标位置的配置。

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

string

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

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

如果引用的资源确实存在且具有兼容的架构,“覆盖”和“附加”参数中必须有一个为 true,否则任务将会失败。

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

overwrite

boolean

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

overwriteappend 参数不能同时为 true

append

boolean

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

overwriteappend 参数不能同时为 true