{"record":{"id":"a30744cb6b017fdb","repo":"pola-rs/polars","slug":"unexpected-three-part-table-name-provide-the-data","errorCode":null,"errorMessage":"Unexpected three-part table name; provide the database/catalog ({catalog!r}) on the connection URI","messagePattern":"Unexpected three-part table name; provide the database/catalog \\((.+?)\\) on the connection URI","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"py-polars/src/polars/dataframe/frame.py","lineNumber":4720,"sourceCode":"            engine_to_dispose: Engine | None = None\n            sa_object: Connectable\n\n            if isinstance(connection, str):\n                sa_object = engine_to_dispose = create_engine(connection)\n            elif isinstance(connection, Session):\n                sa_object = connection.connection()\n            elif isinstance(connection, Connectable):\n                sa_object = connection\n            else:\n                msg = (\n                    f\"unrecognised connection type {qualified_type_name(connection)!r}\"\n                )\n                raise TypeError(msg)\n\n            catalog, db_schema, unpacked_table_name = unpack_table_name(table_name)\n            if catalog:\n                msg = f\"Unexpected three-part table name; provide the database/catalog ({catalog!r}) on the connection URI\"\n                raise ValueError(msg)\n\n            try:\n                # ensure conversion to pandas uses the pyarrow extension array option\n                # so that we can make use of the sql/db export *without* copying data\n                res: int | None = self.to_pandas(\n                    use_pyarrow_extension_array=True,\n                ).to_sql(\n                    name=unpacked_table_name,\n                    schema=db_schema,\n                    con=sa_object,\n                    if_exists=if_table_exists,\n                    index=False,\n                    **(engine_options or {}),\n                )\n            finally:\n                if engine_to_dispose is not None:\n                    engine_to_dispose.dispose()\n","sourceCodeStart":4702,"sourceCodeEnd":4738,"githubUrl":"https://github.com/pola-rs/polars/blob/df599052daf96e7a9cc30a3b0c6bd25d6947e3c0/py-polars/src/polars/dataframe/frame.py#L4702-L4738","documentation":"Error \"Unexpected three-part table name; provide the database/catalog ({catalog!r}) on the connection URI\" thrown in pola-rs/polars.","triggerScenarios":"Thrown at py-polars/src/polars/dataframe/frame.py:4720 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"df599052daf96e7a9cc30a3b0c6bd25d6947e3c0","analyzedAt":"2026-08-16T12:10:03.978Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}