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」。

如果參照的資源不存在,系統會建立新資料表。如果「附加」和「覆寫」參數都為 false,也適用這項做法。

如果參照的資源存在且具有相容的結構定義,「覆寫」和「附加」參數必須有一個為 true,否則工作會失敗。

如果參照資源存在,但結構定義與現有資源不相容,工作也會失敗。

overwrite

boolean

指定資料表已存在且具有相容的結構定義時,是否要覆寫資料表資料。

overwriteappend 參數不得true

append

boolean

指定資料表是否應附加資料 (如果資料表已存在且結構定義相容)。

overwriteappend 參數不得true