-
-
Notifications
You must be signed in to change notification settings - Fork 69
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: PRQL support #152
Comments
Don't apologize -- I really love it when people contribute! Thanks for the detailed issue. We'll definitely merge the Unfortunately, to support MotherDuck we need duckdb >=0.8.1; I don't want to vendor the PRQL extension, I'm also open to better ergonomics around loading extensions using a command-line option. For any of the official extensions we could support something like: harlequin --extension httpfs -e excel We could also support uris: harlequin -e https://extensions.duckdb.org/v0.8.1/windows_amd64/json.duckdb_extension.gz And in the case of prql, a custom repo: harlequin --custom-extension-repository 'welsch.lu/duckdb/prql/latest' --extension prql |
Just confirmed that you can even downgrade duckdb in a pipx installation: pipx install harlequin
pipx inject harlequin "duckdb==0.8.0"
harlequin Then in harlequin, pragma version Returns 0.8.0. |
Also just wanted to note that PRQL isn't supported by Pygments, so syntax highlighting won't work. |
Released in 0.0.24: harlequin -u -e prql --custom-extension-repo welsch.lu/duckdb/prql/latest Also, PRQL released a 0.8.1-compatible extension yesterday (except for Windows), so you shouldn't need to downgrade duckdb any more. |
So, first, sorry about the PR spam on all your repos the last few days 馃槄
The reason I was doing that was because I've been on a personal education journey to learn both DuckDB (because I resonate w/ SQL much more than
pandas
) and PRQL because it's such a powerful and expressive alternative to raw SQL.So if you look at my fork on the prql branch, I've cobbled together a janky version of this based on all my PR's to this repo and
textual-textarea
.Granted that branch is definitely not ready for prime-time, but the bones are there and it actually works pretty great.
The meat of the changes are this:
duckdb
dialect target built-induckdb
dialect mode on-the-flysql()
method on the connection.-unsigned
flag.duckdb
to 0.8.0 in thepyproject.toml
.Obviously, there's a lot from the above that raises questions about if this feature is worth it. But if you think it's something that would be valuable I'm more than happy to continue assisting with contributions.
And there would be more work down the road to make "prql mode" more of a 1st class citizen like including syntax support.
So I understand if it's not something you're interested in including, and it's pretty trivial to keep a patch for this going. Also, if we merge the
-unsigned
changes, then I don't even need the code patches, because you can loadprql
using regular plugin load statements.Thanks in advance for looking at this!
The text was updated successfully, but these errors were encountered: