{"record":{"id":"d3c6eb122d2e0168","repo":"pola-rs/polars","slug":"write-table-table-format-of-catalog-name-names","errorCode":null,"errorMessage":"write_table: table format of {catalog_name}.{namespace}.{table_name} ({data_source_format}) is unsupported.","messagePattern":"write_table: table format of (.+?)\\.(.+?)\\.(.+?) \\((.+?)\\) is unsupported\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"py-polars/src/polars/catalog/unity/client.py","lineNumber":396,"sourceCode":"        )\n\n        if data_source_format in [\"DELTA\", \"DELTASHARING\"]:\n            return df.write_delta(  # type: ignore[misc]\n                storage_location,\n                storage_options=storage_options,\n                credential_provider=credential_provider,\n                mode=delta_mode,\n                delta_write_options=delta_write_options,\n                delta_merge_options=delta_merge_options,\n            )  # type: ignore[call-overload]\n\n        else:\n            msg = (\n                \"write_table: table format of \"\n                f\"{catalog_name}.{namespace}.{table_name} \"\n                f\"({data_source_format}) is unsupported.\"\n            )\n            raise NotImplementedError(msg)\n\n    def create_catalog(\n        self,\n        catalog_name: str,\n        *,\n        comment: str | None = None,\n        storage_root: str | None = None,\n    ) -> CatalogInfo:\n        \"\"\"\n        Create a catalog.\n\n        .. warning::\n            This functionality is considered **unstable**. It may be changed\n            at any point without it being considered a breaking change.\n\n        Parameters\n        ----------\n        catalog_name","sourceCodeStart":378,"sourceCodeEnd":414,"githubUrl":"https://github.com/pola-rs/polars/blob/fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e/py-polars/src/polars/catalog/unity/client.py#L378-L414","documentation":"`write_table` raises NotImplementedError when the target Unity Catalog table's `data_source_format` is one Polars cannot write to. Polars supports writing only a subset of catalog table formats (e.g. Delta); other formats are rejected with a message identifying the fully-qualified table name and its format. This is a capability limit, not a transient failure.","triggerScenarios":"Calling `client.write_table(catalog, ns, table, data)` (or the higher-level write API) where the table's format is unsupported, e.g. CSV or ORC-backed external tables.","commonSituations":"Writing to an external CSV/JSON table in Unity Catalog; assuming all catalog tables accept writes like Delta ones do; legacy tables on older formats.","solutions":["Write to a Delta-backed table (convert the target table to Delta in Databricks)","Write the data via the format-appropriate tool (e.g. use SQL COPY INTO / Databricks SDK for non-Delta targets)","Read the error's data_source_format and check Polars docs for the supported write formats"],"exampleFix":"// before\nclient.write_table(\"cat\", \"sch\", \"csv_table\", df)  # NotImplementedError\n// after\n# write via Databricks SQL for non-Delta tables, or target a Delta table:\nclient.write_table(\"cat\", \"sch\", \"delta_table\", df)","handlingStrategy":"fallback","validationCode":"fmt = client.get_table(catalog, ns, table).data_source_format\nif fmt.upper() not in {'DELTA'}:\n    raise NotImplementedError(f'polars cannot write to {fmt} catalog tables')","typeGuard":null,"tryCatchPattern":"try:\n    client.write_table(c, n, t, df)\nexcept NotImplementedError as e:\n    logging.warning('unsupported catalog write, falling back to SQL path: %s', e)\n    write_via_databricks_sql(c, n, t, df)","preventionTips":["Use Delta-backed tables as the default write target","Check the table format before planning writes in pipelines","Keep a documented fallback path for non-Delta tables"],"tags":["python","databricks","unsupported-operation"],"backgroundTag":"unsupported-operation","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"}