apache/superset · error · DatabaseUploadFailed
Parsing error: %(error)s
Error message
Parsing error: %(error)s
What it means
Raised as DatabaseUploadFailed with message 'Parsing error: <detail>' when pd.read_parquet fails with a recognized parsing exception (pd.errors.ParserError, pd.errors.EmptyDataError, UnicodeDecodeError, or ValueError) while converting an uploaded Parquet buffer to a DataFrame in ColumnarReader._read_buffer_to_dataframe. The underlying pandas/pyarrow message is embedded so the user sees the actual cause (e.g. 'Invalid parquet file', 'No columns to parse from file').
Source
Thrown at superset/commands/database/uploaders/columnar_reader.py:70
super().__init__(
options=dict(options),
)
def _read_buffer_to_dataframe(self, buffer: IO[bytes]) -> pd.DataFrame:
kwargs: dict[str, Any] = {
"path": buffer,
}
if self._options.get("columns_read"):
kwargs["columns"] = self._options.get("columns_read")
try:
return pd.read_parquet(**kwargs)
except (
pd.errors.ParserError,
pd.errors.EmptyDataError,
UnicodeDecodeError,
ValueError,
) as ex:
raise DatabaseUploadFailed(
message=_("Parsing error: %(error)s", error=str(ex))
) from ex
except Exception as ex:
raise DatabaseUploadFailed(_("Error reading Columnar file")) from ex
@staticmethod
def _yield_files(file: FileStorage) -> Generator[IO[bytes], None, None]:
"""
Yields files from the provided file. If the file is a zip file, it yields each
file within the zip file. If it's a single file, it yields the file itself.
:param file: The file to yield files from.
:return: A generator that yields files.
"""
file_suffix = Path(file.filename).suffix
if not file_suffix:
raise DatabaseUploadFailed(_("Unexpected no file extension found"))
file_suffix = file_suffix[1:] # remove the dotView on GitHub (pinned to f4587218dd)
Solutions
- Open the file locally with pandas/pyarrow (pd.read_parquet) to reproduce the exact underlying error shown in %(error)s
- If a column filter was set, verify every name in columns_read matches the file schema exactly (case and whitespace)
- If uploaded inside a ZIP, confirm every entry is a valid Parquet file; re-zip without OS metadata directories
- Regenerate or re-upload the file; if it was truncated, check client-side upload limits (e.g. nginx client_max_body_size, Flask MAX_CONTENT_LENGTH)
Example fix
# before: uploading a zip containing 'data.parquet' and '__MACOSX/._data.parquet' # after: zip only the parquet payload zip clean.zip data.parquet # single entry, valid parquet
Defensive patterns
Strategy: validation
Validate before calling
import pyarrow.parquet as pq
def parquet_is_readable(fh) -> bool:
try:
fh.seek(0)
pq.ParquetFile(fh).metadata # noqa: force footer parse
return True
except Exception:
return False Try / catch
from superset.commands.database.exceptions import DatabaseUploadFailed
try:
reader.file_to_dataframe(file)
except DatabaseUploadFailed as ex:
# message embeds the pandas/pyarrow cause
logger.warning("parquet upload failed: %s", ex.message) # surface to user, keep chained cause Prevention
- Pre-parse Parquet files with pyarrow before uploading
- Keep ZIP archives single-type and free of OS metadata entries
- Match 'columns to read' names exactly to the file schema
When it happens
Trigger: Uploading a Parquet file that is truncated/corrupt, empty (0 rows or empty file inside a ZIP), or not actually Parquet (e.g. a renamed CSV) via the Superset database 'Upload file to table' flow with the Columnar reader; also when a selected column in 'columns_read' does not exist in the file, causing pyarrow to raise ValueError.
Common situations: File truncated during transfer or HTTP upload size limits; picking arbitrary files from a ZIP where one entry is a __MACOSX metadata file or a non-parquet payload; specifying column names with trailing whitespace or wrong case in the column selection UI; Parquet files written by an incompatible/older pyarrow version.
Related errors
- Error reading Columnar file
- Unexpected no file extension found
- error_msg
- Error reading CSV file
- Parsing error: %(error)s
AI-assisted analysis of apache/superset@f4587218dd (2026-08-14).
Data as JSON: /api/errors/4b01bfa7be402ba4.
Report an issue: GitHub.