You can call this operation to query the original text of a sampled SQL statement.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
oceanbase:DescribeSampleSqlRawTexts |
none |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
No |
The ID of the OceanBase cluster. |
ob317v4uif**** |
| TenantId |
string |
No |
The ID of the tenant. |
ob2mr3oae0**** |
| StartTime |
string |
Yes |
The start time. The value must be UTC time in the format of YYYY-MM-DDThh:mm:ssZ. |
2023-04-12T04:38:38Z |
| EndTime |
string |
Yes |
The end time. The value must be UTC time in the format of YYYY-MM-DDThh:mm:ssZ. |
2023-04-12T05:38:38Z |
| DbName |
string |
Yes |
The name of the database. |
test_db |
| SqlId |
string |
Yes |
The ID of the SQL statement. |
8D6E84****0B8FB1823D199E2CA1**** |
| TraceId |
string |
No |
The trace ID of the executed query, which is the value of TraceId returned by DescribeSQLSamples. Note
Note Not all trace IDs of slow SQL statements can be used to query the original text. |
YB420A700EFB-00060D53E42D0C61-0-0 |
| Limit |
string |
No |
The number of returned rows of the SQL statement. |
20 |
| DynamicSql |
boolean |
No |
Specifies whether the SQL statement is an aggregation statement. |
true |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The return result of the request. |
||
| RequestId |
string |
The ID of the request. |
EE205C00-30E4-****-****-87E3A8A2AA0C |
| Data |
object |
The data list. |
|
| SqlText |
array |
The SQL statement. |
|
|
string |
The SQL statement. |
{ "RequestId": "EE205C00-30E4-****-****-87E3A8A2AA0C", "Data": { "SqlText": [ "\"INSERT INTO test (id, k, c, pad) VALUES (36, 87, 11,62582 )\"" ] } } |
Examples
Success response
JSON format
{
"RequestId": "EE205C00-30E4-****-****-87E3A8A2AA0C",
"Data": {
"SqlText": [
"{\n \"RequestId\": \"EE205C00-30E4-****-****-87E3A8A2AA0C\",\n \"Data\": {\n \"SqlText\": [\n \"\\\"INSERT INTO test (id, k, c, pad) VALUES (36, 87, 11,62582 )\\\"\"\n ]\n }\n}"
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.