qstudio icon indicating copy to clipboard operation
qstudio copied to clipboard

Enhancement: Option to see SQL generated from PRQL parser in qstudio

Open SugarRayLua opened this issue 4 months ago • 2 comments

Thanks for making a more efficient user interface to SQL with PRQL syntax and an additionally nice GUI and IDE!

Please consider an additional menu option and/or button on the GUI to see the actual SQL code generated from the PRQL parser parsing the user's .pqrl query. One can see the SQL code in the R binding of PRQL ("prqlr" package on CRAN) by typing:

prql_compile('prqlstring') %>% cat()

but that requires one to be working in a R environment already. If primarily working with databases would seem quicker to have an option to be able to use qstudio as as a PRQL to SQL translator that one could then paste into one's SQL work environment (perhaps if one's work environment doesn't permit the integration of PRQL directly).

SugarRayLua avatar Aug 18 '25 20:08 SugarRayLua

Hi @SugarRayLua , Thanks for the kind words. 👍 I thought I set QStudio to show the compiled PRQL query in the console tab. Can you please check and let me know?

Image

ryanhamilton avatar Aug 18 '25 21:08 ryanhamilton

Hi, @ryanhamilton -- thanks for such a prompt response!

Yes, I see the compiled PRQL query. I was hoping though to see what the compiled PQRL query translates to in SQL as I mentioned one can do with the R-binding in prqlr

Thanks :-)

SugarRayLua avatar Aug 19 '25 00:08 SugarRayLua