Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dashboard): Enables pivot table download option at dashboard level #29123

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

adimyth
Copy link
Contributor

@adimyth adimyth commented Jun 9, 2024

SUMMARY

Enables Export to .Pivoted CSV option for pivot tables at the dashboard level. This option is already available at the chart level but was missing at the dashboard level.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before

Dashboard Download Options Before

After

Dashboard Download Options After

Note: The Export to .Pivoted CSV option is now available at the dashboard level.

Screen Recording

pivot-table-superset.mov

TESTING INSTRUCTIONS

  1. Create a sample dataset. Refer to this sample dataset that I had created for testing.
  2. Create a pivot table from the dataset. Refer attached screenshot above for reference.
  3. Add the pivot table to a dashboard.
  4. Click on the Download option in the dashboard and check if the Export to .Pivoted CSV option is available.
  5. Click on the Export to .Pivoted CSV option and check if the file is downloaded in the .pivoted.csv format.
  6. Open the downloaded file and check if the data is displayed correctly. For the sample dataset, the data should be displayed as shown below:

Output Pivot Table

The pivot table was created as -

  1. Columns - color
  2. Rows - region
  3. Metrics - COUNT(*)

As per this the downloaded data is as expected.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • 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

Massive thanks to @theshivthakur for contributing to this. The credit goes to him!!

@dosubot dosubot bot added the dashboard:export Related to exporting dashboards label Jun 9, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@rusackas rusackas requested a review from kgabryje June 10, 2024 18:35
Copy link
Contributor

@sfirke Ephemeral environment creation is currently limited to committers.

@rusackas
Copy link
Member

@sfirke Ephemeral environment creation is currently limited to committers.

@sfirke this just means you need to make your ASF affiliation public... it's a super weird workflow... just slack me sometime so I can show ya on zoom.

@sfirke
Copy link
Member

sfirke commented Jun 17, 2024

/testenv up

Copy link
Contributor

@sfirke Ephemeral environment spinning up at http://54.191.235.15:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

Copy link
Member

@sfirke sfirke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested out in the ephemeral and confirmed that this functions as intended. Code looks clean and straightforward to me.

@sfirke sfirke merged commit 6378ec5 into apache:master Jun 20, 2024
34 checks passed
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@sfirke
Copy link
Member

sfirke commented Jun 20, 2024

Thanks @theshivthakur and @adimyth for the contribution! This is a nice fix to an annoying limitation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard:export Related to exporting dashboards size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants