Creates an SQL statement.
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 to create an SQL query. |
|
| codeContent |
string |
No |
The SQL code. This parameter accepts one or more SQL statements for execution. |
SHOW TABLES |
| defaultDatabase |
string |
No |
The name of the default database. |
default |
| limit |
integer |
No |
The limit value. The value must be between 1 and 10000, inclusive. |
1000 |
| defaultCatalog |
string |
No |
The ID of the default DLF Catalog. |
default_catalog |
| sqlComputeId |
string |
No |
The ID of the SQL session. The session must be created in the Session Manager module of the EMR Serverless Spark workspace. |
sc-dfahdfjafhajd**** |
| taskBizId |
string |
No |
||
| regionId |
string |
No |
The region ID. |
cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The schema of the response. |
||
| data |
object |
The returned result. |
|
| statementId |
string |
The ID of the interactive query. |
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.