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

A SQL console UI Allows the user to run SQL on tabular data files on client side #3571

Open
t83714 opened this issue Nov 13, 2024 · 1 comment
Assignees

Comments

@t83714
Copy link
Contributor

t83714 commented Nov 13, 2024

A SQL console UI Allows the user to run SQL on the client side

As a user with SQL skills, I want to execute SQL queries on tabular data files without downloading them first. The execution of the SQL query should be done in the web browser, so there is no need to install any software to access this feature.

  • This feature also supports the LLM-driven tabular data analysis feature

Acceptance Criteria

image

  • Click any of the "SQL Console" buttons of any distribution (data file) to open the SQL console in the bottom "drawer" area.
  • User can also open this feature on any page by pressing "ctrl" (or "command" key on mac) + "shift" + "s".
    • Press again to close the drawer
  • Users can use function TXT, CSV, TSV/TAB/, XLS, XLSX, HTML or JSON with the full URL of the remote data source in SQL to load the remote data source and use it as the query table (source).
  • Users can also use the function SOURCE with distribution ID to load a dataset distribution as the remote data source in SQL
    • The SOURCE function also accepts the following special values:
      • string "this" or no value: represents the current selected distribution. e.g. SELECT * FROM SOURCE("this") or SELECT * FROM SOURCE()
      • a number larger or equal to 0: represents nth distribution on the current page. e.g. SELECT * FROM SOURCE(0)
    • You can write the SOURCE function in lowercase as well. e.g. SELECT * FROM source()

Technical Notes

We will use AlaSQL as the in-browser SQL execution engine.

@t83714 t83714 self-assigned this Nov 13, 2024
@t83714 t83714 moved this to In Progress in Magda dev plan Nov 13, 2024
@t83714
Copy link
Contributor Author

t83714 commented Nov 17, 2024

Screenshot of the developed feature

CleanShot 2024-11-17 at 21 00 57@2x

t83714 added a commit that referenced this issue Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

1 participant