submitSparkSql(options)
Submit a Spark SQL query that writes its result to an Iceberg output table. Returns run info immediately; use getRun() or submitSparkSqlAndWait() to poll status.
Parameters
Job namespace.
Job name.
The Spark SQL query to execute.
The Iceberg table the query result is written to.
OVERWRITE or APPEND. Case-insensitive on input.Driver machine type.
Executor machine type.
Number of executors, from 1 to 20.
Return type: SparkSqlSubmitResponse
| Field | Type | Description |
|---|---|---|
run_id | string | The ID of the submitted run |
state | string | Initial run state (for example, SUBMITTED) |
namespace | string | Job namespace |
job_name | string | Job name |
pipeline_id | nullable string | Pipeline ID if one exists |
submitted_at | string | ISO timestamp of submission |
compute | object | driver_machine_type, executor_machine_type, executor_numbers |
output_table | string | The output table |
write_mode | string | The write mode used |
submitSparkSqlAndWait(options)
Submit a Spark SQL query and poll until the run reaches a terminal state (COMPLETE, FAIL, or ABORT). Throws an error if the timeout is exceeded.
submitSparkSql options plus:
Milliseconds between status polls.
Maximum time to wait in milliseconds before throwing a timeout error.
Return shape
| Field | Type | Description |
|---|---|---|
runId | string | The ID of the submitted run |
state | string | Terminal state (COMPLETE, FAIL, or ABORT) |
run | RunResponse | Full run details |