fix(export): Full CSV/Excel exports respecting SQL_MAX_ROW config#33214
Conversation
There was a problem hiding this comment.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Unmemoized Redux Selector ▹ view | 🧠 Not in standard |
Files scanned
| File Path | Reviewed |
|---|---|
| superset-frontend/src/dashboard/components/gridComponents/Chart.jsx | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
| const maxRows = useSelector( | ||
| state => state.dashboardInfo.common.conf.SQL_MAX_ROW, | ||
| ); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
If I understand correctly, the FF currently lets you grab the entire table regardless of SQL_MAX_ROW. On the one hand, I appreciate this fix, as such a feature could nuke the DB and melt your computer. On the other hand, this is a departure from behavior some people have come to expect. It's kind of a breaking change, but that's debatable... this almost feels like a bug fix given the above. Nevertheless, I think there should be a note in UPDATING.md about it, and if you want bonus points, maybe we could surface a tooltip or something that propagates SQL_MAX_ROW so the user knows how many rows they can expect. |
|
After the above, I would almost imagine we could consider turning the FF on full time and deprecating it, which would be nice. |
|
@rusackas I think this was already the case before. @kgabryje recently refactored the dashboard loading for performance improvements (#31241), and if you check the I thought about that too (we don't heavily expose this FF in Preset so I wasn't sure) but I think it always had this "precautionary" measure. |
|
If this doesn't really change the existing behavior, then I'm fine with it as is, merge away! If it does change the behavior, we should probably note it in UPDATING.md so folks are made ware. |
|
thanks @rusackas 🙏 I've updated the description to provide additional context about the change here. Let me know if you have any questions! |
…ache#33214) (cherry picked from commit f7b7aac)
SUMMARY
Superset provides two CSV/Excel export options:
ALLOW_FULL_CSV_EXPORTFF (disabled by default) and only available to Table charts. It would download all data from the chart query (up to theSQL_MAX_ROWconfig).The full download was not working properly and instead of getting the
SQL_MAX_ROWlimit, it was getting a default limit of5000.This is a follow up to #31241 and #31720, to fix this flow so that the full download respects the
SQL_MAX_ROWcoinfig.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
No UI changes.
Before this change, Export to full .CSV/Excel results in a file with <= 5k rows. Now, it results in a file with <=
SQL_MAX_ROWrows.TESTING INSTRUCTIONS
Updated one frontend test. For manual testing:
ALLOW_FULL_CSV_EXPORTFF.SQL_MAX_ROWto100000.flightsdataset with the row limit set to15000and add it to a dashboard.ADDITIONAL INFORMATION