pola-rs/polars · error · TypeError

cannot sink to static Iceberg table: {type(target) = }, {get

Error message

cannot sink to static Iceberg table: {type(target) = }, {getattr(target, 'catalog', None) = }

What it means

Error "cannot sink to static Iceberg table: {type(target) = }, {getattr(target, 'catalog', None) = }" thrown in pola-rs/polars.

Source

Thrown at py-polars/src/polars/io/iceberg/_sink.py:84

            )
            if isinstance(target, str)
            else (
                IcebergCatalogConfig(
                    class_=type(target.catalog),
                    name=target.catalog.name,
                    properties=target.catalog.properties,
                )
            )
        )

        from pyiceberg.catalog.noop import NoopCatalog

        if catalog_config.class_ is NoopCatalog:
            msg = (
                "cannot sink to static Iceberg table: "
                f"{type(target) = }, {getattr(target, 'catalog', None) = }"
            )
            raise TypeError(msg)

        return IcebergSinkState(
            py_catalog_class_module=catalog_config.class_.__module__,
            py_catalog_class_qualname=catalog_config.class_.__qualname__,
            catalog_name=catalog_config.name,
            catalog_properties=catalog_config.properties,
            table_name=target if isinstance(target, str) else ".".join(target.name()),
            mode=mode,
            snapshot_properties=snapshot_properties or {},
            iceberg_storage_properties=storage_options or {},
            sink_uuid_str=gen_uuid_v7().hex(),
            table_=NoPickleOption(target if not isinstance(target, str) else None),
            commit_result_df=NoPickleOption(),
        )

    def table(self) -> pyiceberg.table.Table:
        if self.table_.get() is None:
            module = importlib.import_module(self.py_catalog_class_module)

View on GitHub (pinned to df599052da)

When it happens

Trigger: Thrown at py-polars/src/polars/io/iceberg/_sink.py:84 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of pola-rs/polars@df599052da (2026-08-16). Data as JSON: /api/errors/3ceb4f3581220cd3. Report an issue: GitHub.