microsoft/graphrag · error · ValueError

TableProviderConfig.type '{table_type}' is not registered in

Error message

TableProviderConfig.type '{table_type}' is not registered in the TableProviderFactory. Registered types: {', '.join(table_provider_factory.keys())}.

What it means

TableProviderFactory lazily registers table providers per TableType and falls through to a ValueError when the configured type is neither registered nor has a lazy-import case. The message enumerates registered types to make the mismatch obvious.

Source

Thrown at packages/graphrag-storage/graphrag_storage/tables/table_provider_factory.py:83

                    ParquetTableProvider,
                )

                register_table_provider(TableType.Parquet, ParquetTableProvider)
            case TableType.CSV:
                from graphrag_storage.tables.csv_table_provider import (
                    CSVTableProvider,
                )

                register_table_provider(TableType.CSV, CSVTableProvider)
            case TableType.CosmosDB:
                from graphrag_storage.tables.cosmos_table_provider import (
                    CosmosTableProvider,
                )

                register_table_provider(TableType.CosmosDB, CosmosTableProvider)
            case _:
                msg = f"TableProviderConfig.type '{table_type}' is not registered in the TableProviderFactory. Registered types: {', '.join(table_provider_factory.keys())}."
                raise ValueError(msg)

    if storage:
        config_model["storage"] = storage

    # For CosmosDB table providers, extract connection details from the
    # affiliated Storage instance so users only configure credentials once
    # (on output_storage).  Table-specific fields (container_name,
    # batch_size, legacy_container) stay on TableProviderConfig.
    if table_type == TableType.CosmosDB and storage is not None:
        from graphrag_storage.azure_cosmos_storage import AzureCosmosStorage

        if isinstance(storage, AzureCosmosStorage):
            config_model.setdefault(
                "connection_string",
                storage._connection_string,  # noqa: SLF001
            )
            config_model.setdefault(
                "account_url",

View on GitHub (pinned to f40e9a26ce)

Solutions

  1. Match the exact TableType value from the registered list in the message
  2. Register custom providers with register_table_provider(TableType(...), MyClass) before calling the factory
  3. Upgrade graphrag-storage if an expected builtin is missing from the registry

Example fix

# before
table_type = "CSV"
# after
from graphrag_storage import TableType
table_type = TableType.CSV.value  # "csv"
Defensive patterns

Strategy: validation

Validate before calling

from graphrag_storage.tables import table_provider_factory
valid = set(table_provider_factory.keys()) | {t.value for t in TableType}
assert cfg["type"] in valid

Type guard

def is_known_table_type(t: str) -> bool:
    from graphrag_storage import TableType
    return t in {e.value for e in TableType}

Prevention

When it happens

Trigger: create_table_provider called with a misspelled/unregistered table_type string (e.g. "CSV" vs "csv"), or a custom provider registered after the factory call, or a type removed in a GraphRAG version change.

Common situations: Hand-edited settings.yaml with wrong casing; upgrading GraphRAG where TableType values changed; custom providers not registered via register_table_provider before use.

Related errors


AI-assisted analysis of microsoft/graphrag@f40e9a26ce (2026-08-27). Data as JSON: /api/errors/4a821642c322d998. Report an issue: GitHub.