From SQLServer to ML, a first little step into machine learning

Hi Guys,
Welcome back!

Today a totally new argoument!

It is now clear that the next big wave will be the AI (artificial intelligence) and the ML (Machine Learning).

I know you already have an installation of SQL Server installation.
So let's see how to install machine learning services and the R language!

Follow me!

How to install machine learning services 

Start the installation program and choose the first item.
In italian “Nuova installazione autonoma di SQL Server o aggiunta di funzionalità a un’installazione esistente



Now choose the first checkbox “Esegui una nuova installazione di SQL Server 2017




Choose the functions:
  • Machine Learning Services (In-Database)
  • R (aka R language)


Install the Launchpad service:


Now the installation come to the end:



Restart the SQL Server instance!

Now you need to enable the execution of the external scripts.
You can do this through this command:
       
sp_configure 'external scripts enabled', 1;
RECONFIGURE WITH OVERRIDE;  


The first basic example 

Are you ready? Are you excited?
Well this is the very first example of the R Language

Open the SQL Server Management studio and type:

       
EXEC   sp_execute_external_script 
       @language = N'R' 
     , @script = N'print(1);'      
 

Execute the script and you will obtain:


And now?


Do you want to learn the R Language?
Do you want to learn how to read data from the Database?
Then you just have to follow then next posts of this blog!


See you soon,
Luca


Luca Biondi @ SQLServerPerformance blog 2020!  
  


 

 

 

 

 

Previous post:  How to solve EXECUTE Permission denied on object 'sp_send_dbmail'

Comments

Post a Comment

I Post più popolari

SQL Server, execution plan and the lazy spool (clearly explained)

SQL Server, datetime vs. datetime2

La clausola NOLOCK. Approfondiamo e facciamo chiarezza!