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.
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:
- Azure Data Studio
- Separate R Installation
- Separate Python Installation
- Local installation of SQL Server 2019 (it can also be remote server)
- 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!