superset icon indicating copy to clipboard operation
superset copied to clipboard

[6.0.0rc3] Unable to send CSV charts in reports

Open SkinnyPigeon opened this issue 2 months ago • 3 comments

Bug description

We are currently using 6.0.0rc3 and have noticed that CSV reports are sending only the headers. I am attaching two images. The first is proof that the Dataset does indeed have data and I can access it. The second is the empty report, first as a CSV which just sends the headers and the same report sent as an image that shows that the chart does not contain any data.

There are no RLS filters on the charts and I am using an admin account to send the reports

We've tested a bunch of scenarios and are seeing the same result. The only exception so far has been when I created a tiny dataset based on an SQL Lab query that worked. Steps we've taken so far in testing:

  1. Change the Chart to a different table Chart
  2. Recreate the Dataset with a different owner
  3. Change the owner of the report
  4. Create a new Chart based on the new Dataset
  5. Change the delivery from email to Slack
  6. Change the message type from CSV to image (see below)

This is not isolated to a single chart, we have tested with multiple charts. Manually downloading the data as a CSV from the Chart's edit menu works correctly

Were there any changes to permissions in this release that might apply a filter? Other chart types seem unaffected.

There is nothing in the logs that suggest an error while generating the report

Screenshots/recordings

Image Image

Superset version

master / latest-dev

Python version

3.11

Node version

I don't know

Browser

Not applicable

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.

SkinnyPigeon avatar Dec 05 '25 10:12 SkinnyPigeon

This issue is likely due to how Superset handles query context and authentication for scheduled CSV reports versus manual downloads. Scheduled reports fetch CSV data using the chart's saved query context and a machine-authenticated user, while manual downloads use live query context from the browser session. If the chart's query context is missing or outdated, scheduled reports may return only headers with no data, even though manual downloads work fine. This can happen if the chart was never saved after editing, or if the query context wasn't properly generated for the report executor user. There have also been recent changes to CSV export and streaming that could affect this flow, but no permission changes were found that would filter out data in this way cite cite.

To debug, try opening the affected chart in Explore, making a trivial change, and saving it again to refresh the query context. Then re-run the scheduled report. If the problem persists, check if the chart uses features (like AG Grid or SQL Lab queries) that may have unique export behaviors, as there were recent fixes for CSV downloads from these sources cite. If you still see only headers, it may be a regression related to recent streaming CSV export changes cite.

If you can consistently reproduce this with a specific chart type or dataset, sharing those details could help pinpoint the root cause.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

dosubot[bot] avatar Dec 05 '25 10:12 dosubot[bot]

Hey dosubot. Thanks, I did make a bunch of changes. I tried removing columns and reducing the number of columns. I could see the columns were updated to the reduced selection; however, that still produced an empty report. There are no SQL Lab queries in the affected reports

SkinnyPigeon avatar Dec 05 '25 11:12 SkinnyPigeon

Thanks for confirming the changes and that manual CSV downloads work. Given your steps and Superset 6.0.0rc3, here are the most likely causes and next checks:

  • Scheduled CSV reports use the chart’s saved query context, not the live one from the browser. If the query context references columns that no longer exist in the dataset (for example, after schema changes or column removal), the scheduled report will return only headers with no data—even if the columns look correct in the UI. Manual downloads use the current context, so they work as expected cite cite.

  • Recent changes to CSV export (like streaming for large datasets) could introduce regressions, but these mostly affect performance and chunking, not empty data for small exports cite.

  • Scheduled reports strictly enforce row limits and filters set in the chart configuration. If a filter or limit causes the query to return zero rows, you’ll get only headers in the CSV—even if manual export ignores these limits cite.

  • If you deploy Superset under a subpath (using SUPERSET_APP_ROOT), there’s a known bug in 6.0.0rc2/rc3 where CSV export URLs may be broken, causing empty CSVs. This only applies if you use a subpath cite.

What to try next:

  • Double-check that all columns referenced in the chart’s query context exist in the dataset. Try re-saving the chart after making column changes, then re-run the report.
  • Review chart-level filters and row limits—scheduled reports enforce these strictly.
  • If you use a subpath, test CSV export with SUPERSET_APP_ROOT unset to rule out URL issues.
  • If possible, enable debug logging for the report worker to catch silent errors or query results.

If none of these resolve it, try creating a minimal chart and dataset (not from SQL Lab) and see if the issue persists. This can help isolate whether the problem is dataset-specific or a broader regression.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

dosubot[bot] avatar Dec 05 '25 11:12 dosubot[bot]

Hey @SkinnyPigeon I can't replicate this in 6.0.0rc4. I created a new Report, asked it to send a CSV to me via email, and it did so perfectly. There still could be something going on but if so it's more complex than this simply being broken out of the box.

sfirke avatar Dec 11 '25 14:12 sfirke

Hey, thanks for checking. We definitely did not have the same issue in RC2. I will try to give RC4 a test!

SkinnyPigeon avatar Dec 14 '25 08:12 SkinnyPigeon