submit_spark_sql(options)
Submit a Spark SQL query that writes its result to an Iceberg output table. Returns run info immediately; use get_run() or submit_spark_sql_and_wait() 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 | str | The ID of the submitted run |
state | str | Initial run state (for example, SUBMITTED) |
namespace | str | Job namespace |
job_name | str | Job name |
pipeline_id | Optional[str] | Pipeline ID if one exists |
submitted_at | str | ISO timestamp of submission |
compute | SparkSqlCompute | driver_machine_type, executor_machine_type, executor_numbers |
output_table | str | The output table |
write_mode | str | The write mode used |
submit_spark_sql_and_wait(options)
Submit a Spark SQL query and poll until the run reaches a terminal state (COMPLETE, FAIL, or ABORT). Raises TimeoutError if the timeout is exceeded.
submit_spark_sql options plus:
Milliseconds between status polls. Must be greater than 0.
Maximum time to wait in milliseconds before raising
TimeoutError.Return type: SubmitAndWaitResult
| Field | Type | Description |
|---|---|---|
run_id | str | The ID of the submitted run |
state | str | Terminal state (COMPLETE, FAIL, or ABORT) |
run | RunResponse | Full run details |