Skip to content

feat: Add "Save to Workspace" feature#2

Merged
sunnielyu merged 17 commits intoPolusAI:masterfrom
liuji1031:save_to_workspace
Jan 30, 2026
Merged

feat: Add "Save to Workspace" feature#2
sunnielyu merged 17 commits intoPolusAI:masterfrom
liuji1031:save_to_workspace

Conversation

@liuji1031
Copy link
Copy Markdown

Summary

  • Adds ability to save SQL query results directly to user's workspace storage as a .csv file (~/work/)
  • Supports standard mode and streaming mode for large datasets with progress tracking
  • UI in SQL lab is updated with the "Save to Workspace" button

Changes

New Files

  • superset/commands/sql_lab/save_to_workspace.py - Backend command with sanitization and progress tracking
  • superset-frontend/src/SqlLab/components/SaveToWorkspaceModal/index.tsx - React modal component

Modified Files

  • superset/sqllab/api.py - Added save_to_workspace and progress endpoints
  • superset/sqllab/schemas.py - Added request/response schemas
  • superset-frontend/src/SqlLab/components/ResultSet/index.tsx - Added modal integration and button

Usage

After running a SQL query, users click "Save to Workspace" to configure filename/subfolder and save to ~/work/.

- Updated `getURIDirectory` and `mountExploreUrl` functions to accept an `includeAppRoot` parameter for better control over URL prefixes.
- Modified `ResultSet` and `Chart` components to utilize the new URL handling, allowing for relative URLs in React Router navigation and full URLs for new window openings.
- Updated `assetUrl` function to handle null or undefined paths, defaulting to '/'.
- Enhanced `ensureStaticPrefix` function to return an empty string for falsy inputs.
- Improved `ensureAppRoot` function to handle null or undefined paths similarly.
@sunnielyu sunnielyu changed the base branch from notebookshub to master January 30, 2026 18:19
@sunnielyu sunnielyu merged commit 05ff24a into PolusAI:master Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants