{"record":{"id":"fdc71ab7db60261d","repo":"apache/superset","slug":"database-type-does-not-support-file-uploads","errorCode":null,"errorMessage":"Database type does not support file uploads.","messagePattern":"Database type does not support file uploads\\.","errorType":"exception","errorClass":"DatabaseUploadNotSupported","httpStatus":422,"severity":"error","filePath":"superset/commands/database/uploaders/base.py","lineNumber":293,"sourceCode":"                \"Unable to resolve default schema for upload; proceeding without one\",\n                exc_info=True,\n            )\n            return None\n\n    def validate(self) -> None:\n        self._model = DatabaseDAO.find_by_id(self._model_id)\n        if not self._model:\n            raise DatabaseNotFoundError()\n        engine_resolved = False\n        if not self._schema:\n            self._schema = self._resolve_default_schema(self._model)\n            engine_resolved = self._schema is not None\n        if not schema_allows_file_upload(\n            self._model, self._schema, engine_resolved=engine_resolved\n        ):\n            raise DatabaseSchemaUploadNotAllowed()\n        if not self._model.db_engine_spec.supports_file_upload:\n            raise DatabaseUploadNotSupported()\n\n        self.validate_file_size(self._file)\n","sourceCodeStart":275,"sourceCodeEnd":296,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset/commands/database/uploaders/base.py#L275-L296","documentation":"DatabaseUploadNotSupported is raised when self._model.db_engine_spec.supports_file_upload is False. Only some engines (e.g. those with a working df_to_sql path) accept UI file uploads; the rest reject them at validation time.","triggerScenarios":"Uploading a CSV/Excel to a database whose engine spec (e.g. some OLAP/exotic engines) sets supports_file_upload = False.","commonSituations":"Trying the upload dialog on engines like Druid or custom engine specs that never implemented dataframe upload; newly added engine specs missing the flag.","solutions":["Load the data into the target database directly (native loader, ETL) instead of the UI upload","Use a supported engine (e.g. PostgreSQL) as the upload target","If you own the engine spec, implement/enable supports_file_upload and df_to_sql support"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"if not database.db_engine_spec.supports_file_upload:\n    raise ValueError(f\"{database.db_engine_spec.__name__} cannot accept file uploads\")","typeGuard":"def supports_upload(database: Database) -> bool:\n    return bool(database.db_engine_spec.supports_file_upload)","tryCatchPattern":"try:\n    UploadCommand(...).run()\nexcept DatabaseUploadNotSupported:\n    # route user to a direct-load path or supported engine\n    ...","preventionTips":["Filter the upload UI to engines with supports_file_upload","Use native bulk loaders for unsupported engines"],"tags":["upload","engine","unsupported"],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}