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

Auto-format plugins don't work for SQL in Jupyter notebooks #1009

Open
jaanli opened this issue Apr 21, 2024 · 4 comments
Open

Auto-format plugins don't work for SQL in Jupyter notebooks #1009

jaanli opened this issue Apr 21, 2024 · 4 comments

Comments

@jaanli
Copy link

jaanli commented Apr 21, 2024

What happens?

Hi! This has been an amazing teaching tool.

Unfortunately we are unable to figure out how to debug Visual Studio Code formatting extensions to have them work in cells decorated with %%sql cell magics. E.g. this extension doesn't work: https://marketplace.visualstudio.com/items?itemName=RandomFractalsInc.duckdb-sql-tools nor other formatters.

P.S. Fun anecdote, last year I started my class at Princeton with this notebook + Jupysql: https://github.com/onefact/datathinking.org-codespace/blob/main/notebooks/princeton-university/week-1-visualizing-33-million-phone-calls-in-new-york-city.ipynb

Now Motherduck has used the same dataset + SQL code written thanks to this in their blog! https://motherduck.com/blog/introducing-column-explorer/

To Reproduce

Try to use the formatting shortcut, alt + cmd + f to format, and nothing happens.

OS:

MacOS

JupySQL Version:

Latest

Full Name:

Dr. Jaan Lı

Affiliation:

University of Tartu / One Fact Foundation

@edublancas
Copy link

Hi, I'm unsure about the issue you're reporting. It sounds like a VSCode question (?)

@jaanli
Copy link
Author

jaanli commented Apr 22, 2024

Yes I think so! Thank you @edublancas - what formatter would you recommend for JupySQL cells?

@edublancas
Copy link

I only use JupySQL via Jupyter, so I don't know if there is any VSCode extension that works.

@jaanli
Copy link
Author

jaanli commented Apr 22, 2024

Ah okay - this is via Jupyter as well; sorry for being unclear.

How would you recommend using a formatter in Jupyter, independent of Visual Studio Code? I can reproduce this issue in the Jupyter notebook interface, in a Colaboratory notebook, or WASM Jupyter notebook if needed 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants