全部產品
Search
文件中心

Data Lake Formation:GetQueryResult - 擷取查詢結果

更新時間:Dec 10, 2025

擷取資料探索查詢結果。

調試

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

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

dlf:GetQueryResult

get

*全部資源

*

請求文法

GET /webapi/query/getQueryResult HTTP/1.1

請求參數

名稱

類型

必填

描述

樣本值

QueryId

string

查詢 ID。

說明

您可以調用介面 SubmitQuery 擷取查詢 ID。

Q-41676378709440CE

PageNumber

integer

頁碼。

1

PageSize

integer

每頁大小,最大值為 1000。

100

返回參數

名稱

類型

描述

樣本值

object

獲得查詢結果。

{ "data" : }

Status

string

查詢狀態。

枚舉值:

  • AVAILABLE :

    可用

  • CANCELLED :

    已取消

  • RUNNING :

    運行中

  • CANCELLING :

    取消中

  • WAITING :

    等待中

  • ERROR :

    錯誤

AVAILABLE

ResultTmpTable

string

結果暫存資料表,暫不可用。

table

Owner

integer

建立者主帳號 uid。

229167306180609***

ErrorMessage

string

查詢的錯誤資訊。

Table or view not found:

Progress

integer

查詢進度,0~100 之間。

99

Success

boolean

請求是否成功。取值如下:

  • true:成功。

  • false:失敗。

true

Schema

string

查詢結果的表頭欄位和類型.僅當狀態為 AVAILABLE 時返回。

[{"name":"id","type":"INT"},{"name":"student_name","type":"VARCHAR"}]

ResultTmpDb

string

結果臨時庫,暫不可用。

db

GmtModified

string

查詢結果更新時間。

2022-05-09 16:19:09

JobCompleted

boolean

查詢是否已經完成,false 代表需要繼續輪詢本介面。

true

RowCount

integer

結果總行數,僅當狀態為 AVAILABLE 時返回。

100

RegionId

string

地區 ID。

cn-hangzhou

EndTime

string

查詢完成時間。

2022-05-09 16:19:09

StartTime

string

查詢開始時間。

2022-05-09 16:18:09

RequestId

string

請求 ID。

1D2BCFBA-7639-59A9-817B-944EC1339279

Rows

string

返回結果資訊,僅當狀態為 AVAILABLE 時返回。內容用一個二維 JSON 數組表示。

[[10,"Tom"],[11,"Jerry"]]

Logs

string

作業記錄。

["this is log"]

GmtCreate

string

查詢建立時間。

2022-05-09 16:18:09

Duration

integer

已已耗用時間,單位是毫秒。

8000

Sql

string

原始執行的 sql 語句。

select * from db.student

RowCountOverLimit

boolean

結果總行數是否超過最大值。

false

Id

string

查詢 ID。

Q-41676378709440CE

TotalBytesProcessed

integer

總共掃描資料量,單位位元組。

1024

樣本

正常返回樣本

JSON格式

{
  "Status": "AVAILABLE",
  "ResultTmpTable": "table",
  "Owner": 0,
  "ErrorMessage": "Table or view not found:",
  "Progress": 99,
  "Success": true,
  "Schema": "[{\"name\":\"id\",\"type\":\"INT\"},{\"name\":\"student_name\",\"type\":\"VARCHAR\"}]",
  "ResultTmpDb": "db\n",
  "GmtModified": "2022-05-09 16:19:09",
  "JobCompleted": true,
  "RowCount": 100,
  "RegionId": "cn-hangzhou",
  "EndTime": "2022-05-09 16:19:09",
  "StartTime": "2022-05-09 16:18:09",
  "RequestId": "1D2BCFBA-7639-59A9-817B-944EC1339279",
  "Rows": "[[10,\"Tom\"],[11,\"Jerry\"]]",
  "Logs": "[\"this is log\"]",
  "GmtCreate": "2022-05-09 16:18:09",
  "Duration": 8000,
  "Sql": "select * from db.student",
  "RowCountOverLimit": false,
  "Id": "Q-41676378709440CE\n",
  "TotalBytesProcessed": 1024
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 Query.ResultExpired Query result cache expired, please export result in history query

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

變更歷史

更多資訊,參考變更詳情