maicnaatz commented on PR #45351:
URL: https://github.com/apache/superset/pull/45351#issuecomment-6494686845
**Streaming CSV export ignores CSV_EXPORT settings (sep and decimal) when
CSV_STREAMING_ROW_THRESHOLD is reached
Description**
After testing the recent BOM fix for CSV exports, I found an inconsistency
between the standard CSV export path and the streaming CSV export path.
Configuration
Python
CSV_EXPORT = {"encoding": “utf-8-sig”,”sep”: “;”,”decimal”: “,”,}
**Expected behavior:**
All CSV exports should consistently honor the settings defined in CSV_EXPORT:
• UTF-8 with BOM (utf-8-sig)
• Column separator: ;
• Decimal separator: ,
regardless of whether the export is generated via the standard export path
or the streaming export path.
**Actual behavior:**
Non-streaming export
With:
CSV_STREAMING_ROW_THRESHOLD = 100000000
The generated CSV is correct:
• Separator: ;
• Decimal separator: ,
However, the file is exported without BOM.
Streaming export
With:
CSV_STREAMING_ROW_THRESHOLD = 1
The export switches to the streaming implementation.
In this case:
• Separator becomes a comma
• The decimal separator becomes a dot
• BOM is correctly present
This indicates that the streaming export path does not honor the configured
CSV_EXPORT[“sep”] and CSV_EXPORT[“decimal”] values.
**Additional observations:**
The behavior suggests that there are currently two different CSV
serialization paths:
Export mode BOM Separator Decimal
Therefore, the recent BOM fix appears to work for streaming exports, but the
streaming serializer does not apply the localization settings defined in
CSV_EXPORT.
Environment
• Apache Superset version: 6.1.0 installed via pip (not all files are the
same; patch manually inserted)
• Database backend: MS SQL
• Browser: Firefox.
Should I upload the affected files?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]