superset icon indicating copy to clipboard operation
superset copied to clipboard

fix(chart-table): fixed export full csv not working

Open LahmerIlyas opened this issue 1 year ago • 5 comments

SUMMARY

Exporting the full CSV on the table chart with server pagination was not working properly as it was exporting only the selected page.

After investigation, I found that the issue is because the row limit was being overridden. As a fix, I added a check to verify if the result type is full, and in that case, we won't allow editing the row_limit prop.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

You can see below a recording showing that all the data is present in the exported csv file:

Bug Solution After.webm

TESTING INSTRUCTIONS

  • On your config.py file, you need to enable ALLOW_FULL_CSV_EXPORT flag
  • Go to a table with server pagination enabled
  • On the action menu, select download and click on Export FULL CSV

ADDITIONAL INFORMATION

  • [x] Has associated issue: Fixes #20724
  • [x] Required feature flags: ALLOW_FULL_CSV_EXPORT
  • [ ] Changes UI
  • [ ] Includes DB Migration (follow approval process in SIP-59)
    • [ ] Migration is atomic, supports rollback & is backwards-compatible
    • [ ] Confirm DB migration upgrade and downgrade tested
    • [ ] Runtime estimates and downtime expectations provided
  • [ ] Introduces new feature or API
  • [ ] Removes existing feature or API

LahmerIlyas avatar Apr 03 '23 02:04 LahmerIlyas

Codecov Report

Merging #23554 (f10f673) into master (bd0609d) will not change coverage. The diff coverage is 0.00%.

:exclamation: Current head f10f673 differs from pull request most recent head f028456. Consider uploading reports for the commit f028456 to get more accurate results

@@           Coverage Diff           @@
##           master   #23554   +/-   ##
=======================================
  Coverage   67.70%   67.70%           
=======================================
  Files        1914     1914           
  Lines       73962    73962           
  Branches     8030     8030           
=======================================
  Hits        50077    50077           
  Misses      21838    21838           
  Partials     2047     2047           
Flag Coverage Δ
javascript 53.94% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ntend/plugins/plugin-chart-table/src/buildQuery.ts 56.25% <0.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Apr 03 '23 03:04 codecov[bot]

anyone able to review? It's a one line change.

mike-fischer1 avatar May 20 '23 16:05 mike-fischer1

Thank you for this fix! Do you mind writing a test for it?

eschutho avatar May 30 '23 22:05 eschutho

@LahmerIlyas bumping this - are you able to add a test to this PR? Let us know if you need support to keep this moving.

sfirke avatar Sep 06 '23 14:09 sfirke

Hi, Thank you for this fix. Bumping up old PR as I need this feature to work on large dataset. Anyone able to help add test to this PR?

AndikaPramana avatar May 05 '24 17:05 AndikaPramana

Is this issue resolved or not?

DevByAli avatar Oct 07 '24 15:10 DevByAli