Submits a SparkSQL job.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | SubmitSparkSQL |
The operation that you want to perform. Set the value to SubmitSparkSQL. |
Sql | String | Yes | set spark.driver.resourceSpec=medium;set spark.executor.instances=5; set spark.executor.resourceSpec=medium; set spark.app.name=sparksqltest; show databases; |
The content of Spark SQL. For more information, see Spark SQL. |
VcName | String | Yes | MySparkCluster |
The name of the virtual cluster (VC) to which the SQL job is submitted. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
JobId | String | j202104261729hangzhou224ee5230000930 |
The ID of the Spark job. |
RequestId | String | B570310A-8A49-461B-B81D-AE0B58D63DA4 |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=SubmitSparkSQL
&Sql=set spark.driver.resourceSpec=medium;set spark.executor.instances=5; set spark.executor.resourceSpec=medium; set spark.app.name=sparksqltest; show databases;
&VcName=MySparkCluster
&<Common request parameters>
Sample success responses
XML
format
<RequestId>B570310A-8A49-461B-B81D-AE0B58D63DA4</RequestId>
<JobId>j202104261729hangzhou224ee5230000930</JobId>
JSON
format
{"RequestId":"B570310A-8A49-461B-B81D-AE0B58D63DA4","JobId":"j202104261729hangzhou224ee5230000930"}
Error codes
For a list of error codes, visit the API Error Center.