{"record":{"id":"4ec75bcfc8927a22","repo":"microsoft/graphrag","slug":"csvtableprovider-only-works-with-filestorage-backe","errorCode":null,"errorMessage":"CSVTableProvider only works with FileStorage backends for now. ","messagePattern":"CSVTableProvider only works with FileStorage backends for now\\. ","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/graphrag-storage/graphrag_storage/tables/csv_table_provider.py","lineNumber":40,"sourceCode":"    \"\"\"Table provider that stores tables as CSV files using an underlying Storage instance.\n\n    This provider converts between pandas DataFrames and csv format,\n    storing the data through a Storage backend (file, blob, cosmos, etc.).\n    \"\"\"\n\n    def __init__(self, storage: Storage, **kwargs) -> None:\n        \"\"\"Initialize the CSV table provider with an underlying storage instance.\n\n        Args\n        ----\n            storage: Storage\n                The storage instance to use for reading and writing csv files.\n            **kwargs: Any\n                Additional keyword arguments (currently unused).\n        \"\"\"\n        if not isinstance(storage, FileStorage):\n            msg = \"CSVTableProvider only works with FileStorage backends for now. \"\n            raise TypeError(msg)\n        self._storage = storage\n\n    async def read_dataframe(self, table_name: str) -> pd.DataFrame:\n        \"\"\"Read a table from storage as a pandas DataFrame.\n\n        Args\n        ----\n            table_name: str\n                The name of the table to read. The file will be accessed as '{table_name}.csv'.\n\n        Returns\n        -------\n            pd.DataFrame:\n                The table data loaded from the csv file.\n\n        Raises\n        ------\n            ValueError:","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/microsoft/graphrag/blob/f40e9a26ce62ba0b3fef8837d24aafdcc6e6c704/packages/graphrag-storage/graphrag_storage/tables/csv_table_provider.py#L22-L58","documentation":"CSVTableProvider delegates all file access to a GraphRAG FileStorage instance and relies on filesystem-specific behavior, so its constructor type-checks the injected storage. Passing any other Storage implementation (blob, memory, cosmos) raises TypeError immediately.","triggerScenarios":"Constructing CSVTableProvider(storage=some_blob_or_memory_storage), or a factory wiring where table storage resolves to a non-file backend while the table provider type is 'csv'.","commonSituations":"settings.yaml sets the base storage type to blob (or the output storage to blob) but leaves table type as csv — the csv provider receives the blob storage and rejects it.","solutions":["Set the storage backend to file (type: file_storage / file) so the csv provider gets a FileStorage","Or switch the table provider to one matching your backend (e.g. blob-backed parquet table provider)","Ensure base_dir is configured for FileStorage"],"exampleFix":"# before\nstorage:\n  type: blob\n...\ntable_storage:\n  type: csv\n# after\nstorage:\n  type: file\n  base_dir: output\ntable_storage:\n  type: csv","handlingStrategy":"type-guard","validationCode":"from graphrag_storage import FileStorage\nassert isinstance(storage, FileStorage)","typeGuard":"def is_file_storage(s) -> bool:\n    from graphrag_storage import FileStorage\n    return isinstance(s, FileStorage)","tryCatchPattern":null,"preventionTips":["Keep table type csv only with file storage","Add a config lint: table csv requires storage file"],"tags":["csv","type-mismatch","storage","table-provider"],"backgroundTag":"incompatible-backend-type","analyzedSha":"f40e9a26ce62ba0b3fef8837d24aafdcc6e6c704","analyzedAt":"2026-08-27T11:16:29.677Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}