全部產品
Search
文件中心

DataWorks:UpdateTable

更新時間:Jul 31, 2026

呼叫UpdateTable更新MaxCompute表。

說明

目前該API介面已標記為棄用。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

當前API暫無授權資訊透出。

請求參數

名稱

類型

必填

描述

樣本值

IsView

integer

是否為視圖,包括 0(否)和 1(是)。該欄位已廢棄,請勿使用。

0

Visibility

integer

表的可見性,包括 0(對所有成員不可見)、1(對所有成員可見)和 2(對工作空間成員可見)。

1

LifeCycle

integer

表的生命週期,單位為天。生命週期為空時,表示永久儲存。

10

CategoryId

integer

關聯的類目 ID。

101

LogicalLevelId

integer

邏輯層級 ID。

101

PhysicsLevelId

integer

物理層級 ID。

101

ExternalTableType

string

外表的類型,包括 0(OSS)、1(TableStore)、2(Volume)和 3(MySQL)。該欄位已廢棄,請勿使用。

1

Location

string

外表的儲存位址。該欄位已廢棄,請勿使用。

location

ProjectId

integer

DataWorks 工作空間的 ID。您可以登入 DataWorks 主控台取得工作空間 ID。

101

TableName

string

MaxCompute 表名稱。

abc

Endpoint

string

MaxCompute Endpoint。不填時,預設取專案對應的 Endpoint。

odps://

EnvType

integer

DataWorks 工作空間的環境,包括 0(開發環境)和 1(生產環境)。

1

AppGuid

string

MaxCompute 專案的唯一識別碼,格式為 odps.{projectName}。

odps.test

CreateIfNotExists

boolean

表是否存在:

  • true:是,表存在。

  • false:否,表不存在。

該欄位已廢棄,請勿使用。

true

HasPart

integer

需要更新的 MaxCompute 表是否為分區表,包括 0(否)和 1(是)。該欄位已廢棄,請勿使用。 目前程式碼會根據 Column.N.isPartitionCol 參數判斷 MaxCompute 表是否為分區表,當 Column.N.isPartition 參數取值為 1 時,則認為 MaxCompute 表為分區表。

0

Comment

string

備註資訊。

备注

Schema

string

表 Schema 資訊。在 ODPS,當您啟動了三層模型時需要填寫 Schema 資訊。

default

Columns

array<object>

欄位列表

object

傳回物件

ColumnNameCn

string

欄位的中文名稱。

中文

ColumnName

string

欄位的名稱。

abc

Comment

string

欄位的備註。

备注

ColumnType

string

欄位的類型,請參見 MaxCompute 支援的欄位類型。

string

SeqNumber

integer

欄位的序號。如果欄位為分區欄位,則不支援設定 Columns.N.SeqNumber。

1

Length

integer

欄位的長度。

10

IsPartitionCol

boolean

是否為分區欄位,包括 0(否)和 1(是)。

0

Themes

array<object>

欄位列表

object

傳回物件

ThemeId

integer

關聯的主題 ID。

101

ThemeLevel

integer

主題 ID 對應的層級。

101

返回參數

名稱

類型

描述

樣本值

object

傳回物件

RequestId

string

請求 ID。

abcde

TaskInfo

object

請求任務的資訊。 請求任務提交成功後,會被分為多個子任務有序執行。當前子任務執行成功後,才會繼續執行下一個子任務,所有子任務執行完畢,該請求任務結束。如下情況,請求任務會終止,您需要根據錯誤碼資訊解決問題後重新發起請求任務:

  • 請求任務提交失敗。

  • 請求任務提交成功後,任意子任務執行失敗。

Status

string

當前執行的子任務的狀態資訊。取值如下:

  • operating 表示子任務正在執行中。

  • success 表示子任務執行成功。

  • failure 表示子任務執行失敗。詳細的報錯資訊請參見 Content 參數。

success

NextTaskId

string

即將執行的子任務 ID。如果該欄位為空,則表示所有子任務均已結束。您可以使用取得到的 ID,從 GetDDLJobStatus 介面查詢對應子任務的狀態。

abc1

TaskId

string

當前執行的子任務 ID。

abc

Content

string

當前子任務的執行狀態詳細資訊。具體如下:

  • 執行成功,則顯示 success。

  • 執行失敗則顯示對應的報錯詳情。

success

樣本

正常返回樣本

JSON格式

{
  "RequestId": "abcde",
  "TaskInfo": {
    "Status": "success",
    "NextTaskId": "abc1",
    "TaskId": "abc",
    "Content": "success"
  }
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

500 InternalError.System An internal system error occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later.
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition.
429 Throttling.Api The request for this resource has exceeded your available limit.
429 Throttling.Api.Risk The request for this resource has exceeded your daily available limit.
429 Throttling.System The DataWorks system is busy. Try again later.
429 Throttling.User Your request is too frequent. Try again later.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情