建立一個MaxCompute的資料表。
目前該API介面已標記為棄用。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| IsView |
integer |
否 |
指定建立檢視或建立資料表:
|
0 |
| Visibility |
integer |
否 |
資料表或工作空間是否可見:
|
1 |
| LifeCycle |
integer |
否 |
資料表的生命週期,單位為天。預設取值為空,表示永久儲存。 |
10 |
| CategoryId |
integer |
否 |
關聯類目的 ID。您可以透過 GetMetaCategory 介面查詢可以關聯的類目 ID。 |
101 |
| LogicalLevelId |
integer |
否 |
邏輯層級 ID。 |
101 |
| PhysicsLevelId |
integer |
否 |
實體層級 ID。 |
101 |
| ExternalTableType |
string |
否 |
外部資料表的儲存類型。取值如下:
|
0 |
| Location |
string |
否 |
外部資料表的儲存位址。 |
location |
| ProjectId |
integer |
否 |
DataWorks 工作空間的 ID。 |
23 |
| TableName |
string |
是 |
資料表的名稱。 |
tableName1 |
| Endpoint |
string |
否 |
MaxCompute 的 Endpoint。 |
odps://abc |
| EnvType |
integer |
否 |
DataWorks 工作空間的環境。取值如下:
|
1 |
| AppGuid |
string |
否 |
MaxCompute 專案的 ID,格式為 odps.{projectName}。 |
odps.test |
| Comment |
string |
否 |
備註資訊。 |
备注 |
| HasPart |
integer |
否 |
建立的 MaxCompute 資料表是否為分區資料表,包括 1(是)和 0(否)。該欄位已棄用,請勿使用。 目前程式碼會根據 Column.N.isPartitionCol 參數判斷 MaxCompute 資料表是否為分區資料表,當 Column.N.isPartitionCol 參數取值為 true 時,則認為 MaxCompute 資料表為分區資料表。 |
0 |
| ClientToken |
string |
否 |
保留欄位。 |
保留字段 |
| Schema |
string |
否 |
資料表 Schema 資訊。在 ODPS,當您啟用了三層模型時需要填寫 Schema 資訊。 |
default |
| Columns |
array<object> |
是 |
欄位列表,最大支援 1000 個欄位。 |
|
|
object |
否 |
欄位物件 |
||
| ColumnNameCn |
string |
否 |
欄位的中文名稱。 |
中文名 |
| ColumnName |
string |
是 |
欄位的名稱。 CreateTable API 目前最多支援設定 1000 個欄位。 |
columnName1 |
| Comment |
string |
否 |
欄位的備註資訊。 |
备注 |
| ColumnType |
string |
是 |
欄位的類型。此處支援的欄位類型,取決於您 MaxCompute 專案使用的資料類型版本,各版本支援的資料類型請參見資料類型版本說明。 |
string |
| SeqNumber |
integer |
否 |
欄位的序號。您可以指定欄位在資料表中的排序,預設按照建立請求的順序排序。 如果欄位為分區欄位,則不支援設定 Columns.N.SeqNumber。 |
1 |
| Length |
integer |
否 |
欄位的長度,詳情請參見:資料類型版本。 |
10 |
| IsPartitionCol |
boolean |
否 |
目前欄位是否為分區欄位。 |
true |
| Themes |
array<object> |
否 |
欄位列表 |
|
|
object |
否 |
返回物件 |
||
| ThemeId |
integer |
否 |
主題 ID。 |
101 |
| ThemeLevel |
integer |
否 |
主題 ID 對應的主題層級。 |
101 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回物件 |
||
| RequestId |
string |
請求 ID。 |
abcdef |
| TaskInfo |
object |
請求任務的資訊。 請求任務提交成功後,會被分為多個子任務有序執行。目前子任務執行成功後,才會繼續執行下一個子任務,所有子任務執行完畢,該請求任務結束。 如下情況,請求任務會終止,您需要根據錯誤碼資訊解決問題後重新發起請求任務:
|
|
| Status |
string |
目前執行的子任務的狀態資訊。取值如下:
|
success |
| NextTaskId |
string |
即將執行的子任務 ID。如果該欄位為空,則表示所有子任務均已結束。 |
abc1 |
| TaskId |
string |
目前執行的子任務 ID。 |
abc |
| Content |
string |
目前子任務的執行狀態詳細資訊。具體如下:
|
success |
樣本
正常返回樣本
JSON格式
{
"RequestId": "abcdef",
"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. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。