polars(options)
Run a Polars SQL query or a Python script over lake tables. Provide exactly one of query or script. If the API rejects the run, the SDK raises instead of returning a failed result.
Query mode
Query mode requires at least one table binding, either as"namespace.table" (the alias defaults to the table name) or as PolarsTable(alias=..., table=...).
Script mode
Pass a Python script that uses Polars. Useparams to inject values, and destination/save_mode to persist the result as a lake table. Organization environment variables are available to the script through os.environ.
Distributed runs
Passdistributed=True with a destination to run across multiple workers.
Parameters
Polars runs execute compute synchronously and can take minutes when a sandbox cold-starts or a distributed cluster spins up. The SDK uses an extended request timeout of 30 minutes for Polars runs.