apache/superset · error · DatabaseUploadNotSupported

Database type does not support file uploads.

Error message

Database type does not support file uploads.

What it means

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.

Source

Thrown at superset/commands/database/uploaders/base.py:293

                "Unable to resolve default schema for upload; proceeding without one",
                exc_info=True,
            )
            return None

    def validate(self) -> None:
        self._model = DatabaseDAO.find_by_id(self._model_id)
        if not self._model:
            raise DatabaseNotFoundError()
        engine_resolved = False
        if not self._schema:
            self._schema = self._resolve_default_schema(self._model)
            engine_resolved = self._schema is not None
        if not schema_allows_file_upload(
            self._model, self._schema, engine_resolved=engine_resolved
        ):
            raise DatabaseSchemaUploadNotAllowed()
        if not self._model.db_engine_spec.supports_file_upload:
            raise DatabaseUploadNotSupported()

        self.validate_file_size(self._file)

View on GitHub (pinned to f4587218dd)

Solutions

  1. Load the data into the target database directly (native loader, ETL) instead of the UI upload
  2. Use a supported engine (e.g. PostgreSQL) as the upload target
  3. If you own the engine spec, implement/enable supports_file_upload and df_to_sql support
Defensive patterns

Strategy: type-guard

Validate before calling

if not database.db_engine_spec.supports_file_upload:
    raise ValueError(f"{database.db_engine_spec.__name__} cannot accept file uploads")

Type guard

def supports_upload(database: Database) -> bool:
    return bool(database.db_engine_spec.supports_file_upload)

Try / catch

try:
    UploadCommand(...).run()
except DatabaseUploadNotSupported:
    # route user to a direct-load path or supported engine
    ...

Prevention

When it happens

Trigger: Uploading a CSV/Excel to a database whose engine spec (e.g. some OLAP/exotic engines) sets supports_file_upload = False.

Common situations: Trying the upload dialog on engines like Druid or custom engine specs that never implemented dataframe upload; newly added engine specs missing the flag.

Related errors


AI-assisted analysis of apache/superset@f4587218dd (2026-08-14). Data as JSON: /api/errors/fdc71ab7db60261d. Report an issue: GitHub.