{"record":{"id":"d69e1d3c4d82d634","repo":"pola-rs/polars","slug":"name-is-not-supported-by-the-remote-engine","errorCode":null,"errorMessage":"`{name}` is not supported by the remote engine","messagePattern":"`(.+?)` is not supported by the remote engine","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"py-polars/src/polars/lazyframe/engine_remote.py","lineNumber":235,"sourceCode":"    def _sink_uri(path: Any) -> str | PartitionBy:\n        \"\"\"Validate a Polars Cloud sink target.\"\"\"\n        from polars.io.partition import PartitionBy\n\n        if not isinstance(path, (str, PartitionBy)):\n            msg = (\n                \"the remote engine can only sink to a URI or a `PartitionBy`, got \"\n                f\"{qualified_type_name(path)!r}\"\n            )\n            raise TypeError(msg)\n        return path\n\n    @staticmethod\n    def _reject_if_set(**kwargs: Any) -> None:\n        \"\"\"Reject options unsupported by Polars Cloud.\"\"\"\n        for name, value in kwargs.items():\n            if value:\n                msg = f\"`{name}` is not supported by the remote engine\"\n                raise ValueError(msg)\n\n    def sink_parquet(\n        self,\n        lf: LazyFrame,\n        path: str | Path | IO[bytes] | PartitionBy,\n        *,\n        compression: ParquetCompression,\n        compression_level: int | None,\n        statistics: bool | str | dict[str, bool],\n        row_group_size: int | None,\n        data_page_size: int | None,\n        maintain_order: bool,\n        storage_options: StorageOptionsDict | None,\n        credential_provider: CredentialProviderFunction | Literal[\"auto\"] | None,\n        sync_on_close: SyncOnCloseMethod | None,\n        metadata: ParquetMetadata | None,\n        arrow_schema: ArrowSchemaExportable | None,\n        mkdir: bool,","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/pola-rs/polars/blob/fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e/py-polars/src/polars/lazyframe/engine_remote.py#L217-L253","documentation":"_reject_if_set scans keyword options passed to remote collect/sink calls and raises ValueError for any option set to a truthy value, because Polars Cloud does not support it. The offending option name is interpolated into the message.","triggerScenarios":"Calling lf.collect(engine=RemoteEngine(...), optimization-related flags like unify_schemas=True/parallel=True-style kwargs), or sink_parquet/sink_ipc/sink_csv with unsupported options (e.g. maintain_order=True) that the remote engine rejects.","commonSituations":"Generic wrapper functions that always forward all options to collect/sink; switching an existing local pipeline to the remote engine without pruning options.","solutions":["Remove or set the named option to falsy for remote runs.","Branch on engine type: pass the option only for local engines.","Check the polars-cloud docs for the supported option subset of collect/sink_*."],"exampleFix":"// before\nlf.sink_parquet(uri, engine=remote_engine, maintain_order=True)\n\n// after\nlf.sink_parquet(uri, engine=remote_engine)","handlingStrategy":"validation","validationCode":"UNSUPPORTED_REMOTE = {'maintain_order'}  # plus any flags your wrapper forwards\nbad = {k: v for k, v in options.items() if k in UNSUPPORTED_REMOTE and v}\nif bad:\n    raise ValueError(f'options unsupported by remote engine: {sorted(bad)}')","typeGuard":"def remote_safe_options(options: dict) -> dict:\n    return {k: v for k, v in options.items() if not v or k not in UNSUPPORTED_REMOTE}","tryCatchPattern":"try:\n    lf.collect(engine=remote_engine, **options)\nexcept ValueError as e:\n    if 'is not supported by the remote engine' in str(e):\n        lf.collect(engine=remote_engine)\n    else:\n        raise","preventionTips":["Maintain an explicit allowlist of options your remote pipeline supports.","Audit wrapper functions that forward **kwargs blindly to collect/sink."],"tags":["polars","polars-cloud","unsupported-option","remote-engine"],"backgroundTag":"unsupported-config-value","analyzedSha":"fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e","analyzedAt":"2026-09-18T22:14:11.667Z","contentChangedAt":"2026-09-18T22:14:11.667Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}