ruifpedro opened a new issue, #32886:
URL: https://github.com/apache/superset/issues/32886

   ### Bug description
   
   The bug: Superset sends, via email, broken CSV reports if the chart in 
question, is a table with server pagination enabled.
   
   Steps to recreate:
   1. Create a chart of the table type, with server pagination enabled
   2. Save the chart
   3. Schedule a report: pick the newly created chart, pick the content format 
- "send as CSV", configure email notification method and save
   4. Wait for it to trigger
   5. Find a single, "broken" CSV in your email
   6. Not all tools are able to open the CSV (Google Drive and sheets manages 
to open it)
   
   The CSV looks like this (preview from Google Drive):
   
   
![Image](https://github.com/user-attachments/assets/a4caccd0-6dd8-4c81-8ecf-86b8aa155e96)
   
   What I was able to figure out:
   
   - This only happens when you get a CSV from Superset through the reporting 
functionality
   - Does not happen when, in a chart, be it in the chart editor or a in a 
dashboard, clicking in Download -> Export as CSV; there you get a .zip file 
with two .csv files, one with the data in the table, a second one with a row 
count
   - If you change the file extension from .csv to .zip, from the CSV file you 
get from the email report, it actually is a .zip with two .csv files in it 
(same .zip file you would get from Download -> Export as CSV)
   
   Proof:
   
https://github.com/user-attachments/assets/5537ab8d-217c-4bf9-af30-f831b4e8c76c
   
   Is this the intended behavior on this particular use of reports?
   Should it consider more exporting options (e.g. include row count flag, send 
as zip file)?
   
   Notes:
   - I've only tested the email notification method.
   - In order to mitigate the problem, I've removed server pagination and set a 
high LIMIT value (but would like to run this with no LIMIT)
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   4.1.2
   
   ### Python version
   
   3.10
   
   ### Node version
   
   I don't know
   
   ### Browser
   
   Firefox
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [x] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
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]

Reply via email to