0

I am working with Azure Data Studio and I have a notebook (notebook.ipynb) that uses the SQL kernel in Azure Data Studio. I want to programmatically execute the notebook and convert it to HTML using the jupyter nbconvert command. However, I am unsure if it's possible to use the SQL kernel from Azure Data Studio with jupyter nbconvert.

Is it feasible to run the following command to execute and convert the notebook to HTML, with SQL being the kernel used in Azure Data Studio?

jupyter nbconvert --ExecutePreprocessor.kernel_name=SQL --execute --to html notebook.ipynb

If not, what alternatives or approaches can I take to programmatically execute the notebook and export its results to HTML while using the Azure Data Studio SQL kernel? I am currently running the notebook manually and exporting it to HTML without the --execute flag.

I appreciate any insights or suggestions on how to achieve this. Thank you!

edit:

When I run jupyter kernelspec list this is what I get:

Available kernels:
  powershell       C:\Users\...\AppData\Roaming\jupyter\kernels\powershell
  pysparkkernel    C:\Users\...\AppData\Roaming\jupyter\kernels\pysparkkernel
  sparkkernel      C:\Users\...\AppData\Roaming\jupyter\kernels\sparkkernel
  sparkrkernel     C:\Users\...\AppData\Roaming\jupyter\kernels\sparkrkernel
  python3          C:\Users\...\AppData\Roaming\Python\share\jupyter\kernels\python3

So, Azure Data Studio's SQL kernel is not listed.

0 Answers0