Skip to content

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

Open
@jaanli

Description

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions