posit-dev / posit-dev/positron

SQL Support

Open
#7,233 4 comments 20 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: connections enhancement investigate
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:

  1. 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.
  2. The way results are return is ugly. decimals being shown to nth place, bad spacing between columns, etc. I miss the tibble style formatting of a table.
  3. 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:

  1. Statement-by-statement execution within a .sql file/ executing sql quarto cells.
  2. Formatted results for easy interpretation. Some type of SQL console in the vein of the python/R consoles where results can persist.
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.