QueryWithSQL
Executes an SQL statement to query data in the event warehouse. Applicable to scenarios where the exact SQL statement is known, requiring no natural language conversion or dialog context. Returns a structured result set.
Operation description
Queries event content.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eventbridge:QueryWithSQL |
list |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Query |
string |
Yes |
The query statement. Typically, a three-part table name in the format of catalog.namespace.table is used. |
SELECT * FROM "test-es"."default"."product_info" |
| Limit |
integer |
No |
The number of entries to return. Default value: 20. Maximum value: 50. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The response code returned by the API operation. Valid values:
|
Success |
| Data |
object |
The event trace information. |
|
| Rows |
array |
The rows in the query result. |
|
| Row |
The rows in the query result. |
{ "columns": [ { "column_name": "index", "column_type": "varchar", "column_value": "product_info", "is_null": false }, { "column_name": "docs.count", "column_type": "bigint", "column_value": "0", "is_null": false } ] } |
|
| Total |
integer |
The total number of entries. |
1 |
| Message |
string |
The error message. |
Operation success |
| RequestId |
string |
The request ID. |
34AD682D-5B91-5773-8132-AA38C130**** |
| Success |
boolean |
Indicates whether the operation is successful. Valid values:
|
true |
Examples
Success response
JSON format
{
"Code": "Success",
"Data": {
"Rows": [
{
"Columns": [
{
"IsNull": false,
"Name": "index",
"Type": "text",
"Value": "product_info"
}
]
}
],
"Total": 1
},
"Message": "Operation success",
"RequestId": "34AD682D-5B91-5773-8132-AA38C130****",
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | ServiceNotEnable | Service not enable |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.