Skip to content

Conversation

@cccs-jc
Copy link
Contributor

@cccs-jc cccs-jc commented Nov 6, 2021

VSCode can open and run Jupyter Notebooks files (.ipynb).

A Notebook cell often executes python code via an IPython kernel.

IPython kernel support magics which enable it to run other languages such
as SQL.

This PR adds support for the following magics: %%sql, %%sparksql, %%trino

It detects cells with these magics and changes the mime type of the notebook cells.

By setting a cell to mime type SQL it activates the sql-language-server
enabling code completion within a
Notebook.

cccs-jc added 2 commits November 5, 2021 20:39
In VSCode you can open an .ipynb file and change the language of a
code cell. In this use case there are no file extensions used but only a
language ID is use. Added a document
selector which is based only on the SQL language ID.
VSCode can open and run Jupyter Notebooks files (.ipynb).

A Notebook cell often executes python code via an IPython kernel.

IPython kernel suppor magics which enable it to run other languages such
as SQL.

This PR adds support for the following magics: %%sql, %%sparksql, %%trino

It detects cells with these magics and changes the mime type of the notebook cells.

By setting a cell to mime type SQL it activates the sql-language-server
enabling code completion within a
Notebook.
@joe-re joe-re self-requested a review November 14, 2021 22:01
@joe-re
Copy link
Owner

joe-re commented Dec 5, 2021

@cccs-jc Sorry for my late review, since I've not had enough experience with Jupyter notebooks.
As long as I've tested it, it works great. But I've not used Jupyter notebooks usually..
If you see any problems please feel free to raise it, thanks. 🙏

@joe-re joe-re merged commit 19dc990 into joe-re:release Dec 5, 2021
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

Successfully merging this pull request may close these issues.

2 participants