{"record":{"id":"4a821642c322d998","repo":"microsoft/graphrag","slug":"tableproviderconfig-type-table-type-is-not-reg","errorCode":null,"errorMessage":"TableProviderConfig.type '{table_type}' is not registered in the TableProviderFactory. Registered types: {', '.join(table_provider_factory.keys())}.","messagePattern":"TableProviderConfig\\.type '(.+?)' is not registered in the TableProviderFactory\\. Registered types: (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"packages/graphrag-storage/graphrag_storage/tables/table_provider_factory.py","lineNumber":83,"sourceCode":"                    ParquetTableProvider,\n                )\n\n                register_table_provider(TableType.Parquet, ParquetTableProvider)\n            case TableType.CSV:\n                from graphrag_storage.tables.csv_table_provider import (\n                    CSVTableProvider,\n                )\n\n                register_table_provider(TableType.CSV, CSVTableProvider)\n            case TableType.CosmosDB:\n                from graphrag_storage.tables.cosmos_table_provider import (\n                    CosmosTableProvider,\n                )\n\n                register_table_provider(TableType.CosmosDB, CosmosTableProvider)\n            case _:\n                msg = f\"TableProviderConfig.type '{table_type}' is not registered in the TableProviderFactory. Registered types: {', '.join(table_provider_factory.keys())}.\"\n                raise ValueError(msg)\n\n    if storage:\n        config_model[\"storage\"] = storage\n\n    # For CosmosDB table providers, extract connection details from the\n    # affiliated Storage instance so users only configure credentials once\n    # (on output_storage).  Table-specific fields (container_name,\n    # batch_size, legacy_container) stay on TableProviderConfig.\n    if table_type == TableType.CosmosDB and storage is not None:\n        from graphrag_storage.azure_cosmos_storage import AzureCosmosStorage\n\n        if isinstance(storage, AzureCosmosStorage):\n            config_model.setdefault(\n                \"connection_string\",\n                storage._connection_string,  # noqa: SLF001\n            )\n            config_model.setdefault(\n                \"account_url\",","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/microsoft/graphrag/blob/f40e9a26ce62ba0b3fef8837d24aafdcc6e6c704/packages/graphrag-storage/graphrag_storage/tables/table_provider_factory.py#L65-L101","documentation":"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.","triggerScenarios":"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.","commonSituations":"Hand-edited settings.yaml with wrong casing; upgrading GraphRAG where TableType values changed; custom providers not registered via register_table_provider before use.","solutions":["Match the exact TableType value from the registered list in the message","Register custom providers with register_table_provider(TableType(...), MyClass) before calling the factory","Upgrade graphrag-storage if an expected builtin is missing from the registry"],"exampleFix":"# before\ntable_type = \"CSV\"\n# after\nfrom graphrag_storage import TableType\ntable_type = TableType.CSV.value  # \"csv\"","handlingStrategy":"validation","validationCode":"from graphrag_storage.tables import table_provider_factory\nvalid = set(table_provider_factory.keys()) | {t.value for t in TableType}\nassert cfg[\"type\"] in valid","typeGuard":"def is_known_table_type(t: str) -> bool:\n    from graphrag_storage import TableType\n    return t in {e.value for e in TableType}","tryCatchPattern":null,"preventionTips":["Use TableType enum values in config","Register custom providers at import time of your app"],"tags":["factory","registry","table-provider","config"],"backgroundTag":"unsupported-provider-type","analyzedSha":"f40e9a26ce62ba0b3fef8837d24aafdcc6e6c704","analyzedAt":"2026-08-27T11:16:29.677Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}