CreateSqlStatement
Creates an SQL query.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
emr-serverless-spark:CreateSqlStatement |
create |
*All Resource
|
None | None |
Request syntax
PUT /api/interactive/v1/workspace/{workspaceId}/statement HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| workspaceId |
string |
No |
The workspace ID. |
w-26ca1703f6d**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body for creating an SQL query. |
|
| codeContent |
string |
No |
The SQL code. You can specify one or more SQL statements to execute. |
SHOW TABLES |
| defaultDatabase |
string |
No |
The default database name. |
default |
| limit |
integer |
No |
The limit value. Valid values: 1 to 10000. |
1000 |
| defaultCatalog |
string |
No |
The default DLF catalog ID. |
default_catalog |
| sqlComputeId |
string |
No |
The SQL session ID. Create the session in the session management module of the EMR Serverless Spark workspace. |
sc-dfahdfjafhajd**** |
| taskBizId |
string |
No |
The data development node ID. |
TSK-d87****************** |
| regionId |
string |
No |
The region ID. |
cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| data |
object |
The returned result. |
|
| statementId |
string |
The interactive query ID. |
st-1231dfafadfa*** |
| requestId |
string |
The request ID. |
DD6B1B2A-5837-5237-ABE4-FF0C8944**** |
Examples
Success response
JSON format
{
"data": {
"statementId": "st-1231dfafadfa***"
},
"requestId": "DD6B1B2A-5837-5237-ABE4-FF0C8944****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.