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 throws 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 { alias, table }.
Script mode
Pass a Python script that uses Polars. Useparams to inject values, and destination/saveMode 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
Instance type for distributed runs:
t4g.medium (default), t4g.large, m6g.large, or m6g.xlarge.Polars runs execute compute synchronously and can take minutes when a sandbox cold-starts or a distributed cluster spins up.