Skip to content

Commit f210704

Browse files
fix(csv-upload): log detailed errors during chunk concatenation for debugging
1 parent fb8eb2a commit f210704

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

superset/commands/database/uploaders/csv_reader.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,16 @@ def _read_csv( # noqa: C901
414414
break
415415

416416
if chunks:
417-
result = pd.concat(chunks, ignore_index=False)
417+
try:
418+
result = pd.concat(chunks, ignore_index=False)
419+
except Exception as ex:
420+
logger.warning(
421+
"Error concatenating CSV chunks: %s. "
422+
"This may be due to inconsistent date parsing across chunks.",
423+
str(ex),
424+
)
425+
raise
426+
418427
# When using chunking, we need to reset and rebuild the index
419428
if kwargs.get("index_col") is not None:
420429
# The index was already set by pandas during read_csv

0 commit comments

Comments
 (0)