获取SQL查询详细信息-GetSQLQuery

获取用户提交的SQL查询任务的详细信息

Request Parameters

Parameter nameTypeDescriptionRequired
Regionstring地域。 参见 地域和可用区列表Yes
ProjectIdstring项目ID,不填则为默认项目No
QueryIdstringSQL查询的IDYes

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
RequeststringAPI请求IDNo
QueryIdstringSQL查询IDNo
Statestring查询任务当前状态。RUNNING: 正在运行,CANCELLED:用户取消任务,SUCCEED:任务运行成功,FAILED: 任务运行失败No
ElapsedTimeint查询已运行时间No
ScannedBytesint查询扫描数据字节数No
QueryErrorCodeint查询任务错误码No
QueryErrorMessagestring查询任务错误信息No
StartTimeint查询任务启动时间No
EndTimeint查询任务结束时间No
Headersarray查询结果字段名列表No
QueryTypestringSQL查询类型, 有SELECT,CREATE_DATABASE, DROP_DATABASE, CREATE_TABLE, DROP_TABLE, SHOW_CREATE_TABLENo
OutputRecordCountint查询结果的记录总数No

Request Example

https://api.ucloud.cn/?Action=GetSQLQuery
&Region=pre
&QueryId=20180913_082139_00000_22dwf
&ProjectId=iRdAMxGy

Response Example

{
    "RetCode": 0,
    "Action": "GetSQLQueryResponse",
    "Request": "dfa59d02-ae37-4386-80d4-686a3c3fa021",
    "QueryId": "20180913_082139_00000_22dwf",
    "State": "SUCCEED",
    "ElapsedTime": 2363,
    "ScannedBytes": 2222,
    "QueryErrorCode": 0,
    "QueryErrorMessage": "",
    "StartTime": "2018-09-13T08:21:39.000+0000",
    "EndTime": "2018-09-13T08:21:42.000+0000",
    "Headers": [
        "n_nationkey",
        "n_name",
        "n_regionkey",
        "n_comment"
    ],
    "QueryType": "fzWjVtIK",
    "OutputRecordCount": 5
}