oleander polars command runs Polars workloads against your Iceberg lake tables. It supports two modes:
- Query mode - execute a Polars SQL expression across one or more tables
- Script mode - run a Python script that uses the Polars API directly
--distributed to offload execution to Polars Cloud.
Query mode
Run a Polars SQL query against one or more lake tables. Register each table with--table.
alias=namespace.table to register a table under a short alias. Multiple --table flags are supported:
Script mode
Pass a Python file with--script. oleander injects the Polars runtime, auth, and catalog - your script only needs to assign a result.
Python template
The following variables are available in your script without any imports:
Your script must assign its output to
result - a Polars LazyFrame or DataFrame. Do not call .collect() or .remote() yourself; oleander handles execution.
Saving results
Use--save to write the result to a table in your lake. The destination is a namespace.table identifier.
Distributed execution
Pass--distributed to run the workload on Polars Cloud instead of in the local sandbox. Use --instance-type and --cluster-size to control the compute.