Site icon R-bloggers

Using multi languages Azure Data Studio Notebooks

[This article was first published on R – TomazTsql, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Using multiple languages is a huge advantages when people choose notebooks over standard code files. And with notebooks in Azure Data Studio without switching the kernels, you can stay on one and work your code by using following functions for switching.

%%lang_r
%%lang_py

First, installing the Azure Data Studio . In addition, you can decide on your setup of choice. Let me point out, how my test environment looks:

  1. Azure Data Studio
  2. Separate R Installation
  3. Separate Python Installation
  4. Local installation of SQL Server 2019 (it can also be remote server)
  5. Optionally: Azure SQL Database

Once you have this installed, go and download the extension for Azure Data Studio – Machine Learning extension.

Once the extension is installed, under the preferences, select the setting and go to extensions, where you will find all the installed extensions on your machine. Select the machine learning extension.

In this setting, you will have the capability to enable R and Python and configure the path to preexisting installation of both languages.

Once you have setting configures, you can easily start using the %%lang_r or %%lang_py function.

If you decide to use SQL Server kernel, you can also use the sp_execute_External_Script procedure with R, Python or Java – if you have them preinstalled.

As always, notebook is available at Github.

Happy SQL coding and stay healthy!

To leave a comment for the author, please follow the link and comment on their blog: R – TomazTsql.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.