posit-dev / posit-dev/positron
SQL Support
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 206
Description
Hello, I originally asked this question in the discussions section and was encouraged to make a corresponding issue, so here it is!
There comes a time in every Data Scientist's life where they must write SQL. I've long wanted a a SQL interface that mimics the R experience of writing a statement, hitting cmd + enter, seeing the result and iterating. I'm filing this issue in the hope that Positron might offer that experience at some point in the future.
The closest I can get currently is with the SQLTools extension. The extension allows for working in .sql files, sending statements to a database and returning results, but I'd say not in a DS friendly way. Top reasons being:
- It expects that the entire SQL file is dedicated to one query of interest. Where typically a DS is interested in the results of many queries.
- The way results are return is ugly. decimals being shown to nth place, bad spacing between columns, etc. I miss the
tibblestyle formatting of a table. - You must either give each query execution it's own editor tab to be able to compare results across queries or overwrite results in the same tab.
To summarize, my ideal setup would include:
- Statement-by-statement execution within a
.sqlfile/ executingsqlquarto cells. - Formatted results for easy interpretation. Some type of SQL console in the vein of the python/R consoles where results can persist.
- Easy injection of results into a R/python dataframe for further visualization and exploration.
I'm really excited about the project, thanks for welcoming sugestions!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue describes a broad SQL workflow spanning statement execution, result formatting, persistent console output, and dataframe integration, but names no files, tests, or entry points. Start by identifying the existing SQLTools integration and current R/Python console result-handling paths. Done would require a defined, scoped design and implementation for the requested SQL experience.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100