Skip to main content
POST
Spark

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
namespace
string
required

Job namespace used to identify this query in lineage and run history.

Example:

"oleander.query"

name
string
required

Job name. Combined with namespace to form the unique job identity.

Example:

"flowers_copy"

query
string
required

SQL query to execute. Supports all Spark SQL syntax and can reference any table in your Iceberg catalogs.

Example:

"SELECT * FROM oleander.default.flowers"

output_table
string
required

Destination Iceberg table for query results. Format: catalog.namespace.table. The table is created if it does not exist.

Example:

"oleander.default.flowers_query_spark_sql"

driver_machine_type
string
default:spark.1.b

Machine type for the Spark driver.

Example:

"spark.1.b"

executor_machine_type
string
default:spark.1.b

Machine type for each Spark executor.

Example:

"spark.1.b"

executor_numbers
integer
default:1

Number of Spark executors to allocate.

Example:

1

Response

Query submitted successfully.

run_id
string<uuid>

Run ID for this Spark query execution. Use this to track the run in the oleander platform.

job
object
output_table
string

The destination table results will be written to.

status
string

Initial run status.

Example:

"RUNNING"