Skip to content

Add CSV Download Functionality to ResultSet Component#38

Open
Sano7707 wants to merge 1 commit into
trinodb:mainfrom
scc-digitalhub:feature/csv-button
Open

Add CSV Download Functionality to ResultSet Component#38
Sano7707 wants to merge 1 commit into
trinodb:mainfrom
scc-digitalhub:feature/csv-button

Conversation

@Sano7707

Copy link
Copy Markdown

Summary

This PR adds the ability to download query results directly as a CSV file from the query results pane.

A new CSV action button has been added to the results toolbar alongside the existing actions. When clicked, the current result set is dynamically converted into a CSV file and downloaded locally. The generated file is automatically named using the corresponding queryId.

Implementation Details

The exported CSV is generated in the browser and follows standard CSV formatting rules, including proper escaping of:

  • Double quotes
  • Commas
  • Newline characters

Null and undefined values are exported as empty fields.

UI Changes

A new CSV action button is added next to the existing actions in the results toolbar:

Screenshot 2026-06-19 at 10 26 25

Example Behavior

Clicking the CSV button:

  1. Formats the current query results as a CSV document.
  2. Applies proper escaping for special characters.
  3. Initiates a local file download.
  4. Names the file using the associated queryId.

@cla-bot

cla-bot Bot commented Jun 19, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant