SlideShare a Scribd company logo
October 4th, 5th & 6th 2018.NET Conf AR v2018
SQL Server Machine
Learning
Maximiliano Accotto (MVP Data Platform)
Owner
TriggerDB Consulting SRL
www.triggerdb.com
October 4th, 5th & 6th 2018.NET Conf AR v2018
Regular Database + App Intelligence Database + App
Llevar la inteligencia a donde están los datos
Application +
Intelligence
Database
Application
Intelligence
+ Database
VS
October 4th, 5th & 6th 2018.NET Conf AR v2018
¿Porque ML en SQL Server?
Eliminar el movimiento de datos
Aprovechar la seguridad de la base de datos
Ejecutar los calculos de ML en la base de datos
Operación ML scripts y modelos
Usar store Procedures de T-SQL
Manejar los modelos en el SQL Server
Performance y escalabilidad Enterprise
Escalar con R y Python analytics usando multi-threading
y parallel processing.
SQL Server security, compliance, resource governance,
query performance, always on secondaries
Data Scientist
Interacts directly
with data
SQL Developer/
DBA
Manage data and
analytics together
SQL Transformations
010010
100100
010101
Relational data
Analytics library
R
integration
010010
100100
010101
010010
100100
010101
Python
integration
October 4th, 5th & 6th 2018.NET Conf AR v2018
SQL Machine Learning Services
• SQL Server 2016
• R support (3.2.2 version)
• Microsoft R Server
• SQL Server 2017
• Scoring native en TSQL usando PREDICT function
• EXTERNAL LIBRARY DDL para el manejo de paquetes R
• Ejecución en batch para la entrada de datos
• Soporte para R (3.3.3 version)
• Soporte para Python (Anaconda 3.5.2)
October 4th, 5th & 6th 2018.NET Conf AR v2018
Any R/Python
IDE
Data Scientist
Workstation
Script
Results
Execution
1
3
Data Scientists - Exploración de Datos y Desarrollo de Modelos
SQL Server
2
R/Python Runtime
Machine Learning
Services
train <- RxSqlServerData(query,
connectionString, computeContext)
rxLogit(formula, train)
October 4th, 5th & 6th 2018.NET Conf AR v2018
Application exec sp_execute_external_script
@language = ‘Python’
, @script =
-- Python code --
The stored procedure
contains R or Python code
and executes in-database
Application Developer - Operacionalización de
modelos
Stored Proc call
Results
1
3
Execution
SQL Server
2
R/Python Runtime
Machine Learning
Services
October 4th, 5th & 6th 2018.NET Conf AR v2018
Trabajo del DBA: Habilitar ML en SQL Server 
Enable External scripts
– Exec sp_configure ‘external
scripts enabled’, 1
– RCONFIGURE
SQL Server 2016
O superior
October 4th, 5th & 6th 2018.NET Conf AR v2018
sp_execute_external_script
October 4th, 5th & 6th 2018.NET Conf AR v2018
Tipos de salida
1. Dataset
• Standard resultset of rows and columns
• Data types will vary
2. Plot
• Static images
• Binary
3. Model
• Trained models such as linear regression, naïve bayes, etc.
• Binary
October 4th, 5th & 6th 2018.NET Conf AR v2018
Realtime Predictions usando Scoring nativo
• PREDICT function
• No depende de R o Python runtime
• Habilitado on SQL Server tanto en Windows como Linux
• Uso
• Single or small number of rows scoring
• Highly concurrent scoring scenarios
• Predict during INSERT, UPDATE, MERGE statements
• Requirements
• Models built using RevoScaleR or revoscalepy
• rxLinMod, rxLogit, rxBTrees, rxDTree, rxDForest
• Serialized using rxSerializeModel (R) or rx_serialize_model (Python)
October 4th, 5th & 6th 2018.NET Conf AR v2018
PREDICT syntax
October 4th, 5th & 6th 2018.NET Conf AR v2018
1,000,000 predictions per second
https://blogs.technet.microsoft.com/dataplatforminsider/2016/10/11/1000000-predictions-per-second/
October 4th, 5th & 6th 2018.NET Conf AR v2018
SQL Machine Learning Server
• Soporte Multi-plataforma
• Windows, Linux, Hadoop, SQL Server
• Microsoft R Server
• RevoScaleR, MicrosoftML, olapR, sqlrutils packages
• Uso de Web services para operar.
• Microsoft Machine Learning Server
• Soporte de R & Python
• revoscalepy, microsoftml python libraries
• rxExecBy
October 4th, 5th & 6th 2018.NET Conf AR v2018
SQL Machine Learning Server
• Setup one-box
configuration
> az ml admin boostrap
• Jupyter notebook deploy,
and consume
October 4th, 5th & 6th 2018.NET Conf AR v2018
SQL Machine Learning Server – Multi Server
Configuration
October 4th, 5th & 6th 2018.NET Conf AR v2018
SQL Server 2019 y ML (big data Cluster)
October 4th, 5th & 6th 2018.NET Conf AR v2018
Demos
October 4th, 5th & 6th 2018.NET Conf AR v2018
Muchas gracias
http://blog.triggerdb.com/maxi
maxiaccotto
Maxi@triggerdb.com
Maximiliano Accotto

More Related Content

PPTX
Cooking serverless recipes with Azure Functions and Azure Cosmos DB - NET Con...
PDF
Tracking data lineage at Stitch Fix
PDF
GraphQL Advanced
PDF
Misusing MLflow To Help Deduplicate Data At Scale
PPTX
Data analytics at a petabyte scale final
PDF
Building Notebook-based AI Pipelines with Elyra and Kubeflow
PDF
Presto: Fast SQL-on-Anything (including Delta Lake, Snowflake, Elasticsearch ...
PDF
Bringing a public GraphQL API from the whiteboard to production
Cooking serverless recipes with Azure Functions and Azure Cosmos DB - NET Con...
Tracking data lineage at Stitch Fix
GraphQL Advanced
Misusing MLflow To Help Deduplicate Data At Scale
Data analytics at a petabyte scale final
Building Notebook-based AI Pipelines with Elyra and Kubeflow
Presto: Fast SQL-on-Anything (including Delta Lake, Snowflake, Elasticsearch ...
Bringing a public GraphQL API from the whiteboard to production

What's hot (20)

PPTX
Quix presto ide, presto summit IL
PPTX
GraphQL Misconfiguration
PPTX
05Nov13 Webinar: Introducing Revolution R Enterprise 7 - The Big Data Big Ana...
PPTX
Spline: Data Lineage For Spark Structured Streaming
PPTX
Apache Flink Online Training
PDF
Torkel Ödegaard (Creator of Grafana) - Grafana at #DOXLON
PDF
Scaling ML-Based Threat Detection For Production Cyber Attacks
PDF
The Little Warehouse That Couldn't Or: How We Learned to Stop Worrying and Mo...
PPTX
Attacking GraphQL
PDF
Fast Data processing with RFX
PDF
An Update on Scaling Data Science Applications with SparkR in 2018 with Heiko...
PDF
Apache flink
PDF
GraphQL Search
PDF
Moving a Fraud-Fighting Random Forest from scikit-learn to Spark with MLlib, ...
PPTX
Distributed Data Quality - Technical Solutions for Organizational Scaling
PDF
Model versioning done right: A ModelDB 2.0 Walkthrough
PDF
Microsoft R Server for Data Sciencea
PDF
Bringing a public GraphQL API from beta to production ready
PDF
Consolidating MLOps at One of Europe’s Biggest Airports
PPTX
Introduction to graphQL
Quix presto ide, presto summit IL
GraphQL Misconfiguration
05Nov13 Webinar: Introducing Revolution R Enterprise 7 - The Big Data Big Ana...
Spline: Data Lineage For Spark Structured Streaming
Apache Flink Online Training
Torkel Ödegaard (Creator of Grafana) - Grafana at #DOXLON
Scaling ML-Based Threat Detection For Production Cyber Attacks
The Little Warehouse That Couldn't Or: How We Learned to Stop Worrying and Mo...
Attacking GraphQL
Fast Data processing with RFX
An Update on Scaling Data Science Applications with SparkR in 2018 with Heiko...
Apache flink
GraphQL Search
Moving a Fraud-Fighting Random Forest from scikit-learn to Spark with MLlib, ...
Distributed Data Quality - Technical Solutions for Organizational Scaling
Model versioning done right: A ModelDB 2.0 Walkthrough
Microsoft R Server for Data Sciencea
Bringing a public GraphQL API from beta to production ready
Consolidating MLOps at One of Europe’s Biggest Airports
Introduction to graphQL
Ad

Similar to Sql server machine learning (20)

PPTX
Moving advanced analytics to your sql server databases
PDF
Sql Server Machine Learning Services - Sql Saturday Prague 2018 #SqlSatPrague
PDF
Advanced analytics with R and SQL
PDF
The Polyglot Data Scientist - Exploring R, Python, and SQL Server
PPTX
The roadmap for sql server 2019
PDF
Predictive Analysis using Microsoft SQL Server R Services
PPTX
SQL Server R Services: What Every SQL Professional Should Know
PPTX
Overview SQL Server 2019
PDF
Microsoft Technologies for Data Science 201612
PPTX
Microsoft Data Platform Airlift 2017 Rui Quintino Machine Learning with SQL S...
PDF
Microsoft Data Science Technologies 201608
PPTX
introduction to sql server by moamen hany
PPTX
PASS Summit - SQL Server 2017 Deep Dive
PDF
Secrets of Enterprise Data Mining: SQL Saturday Oregon 201411
PPTX
Operational Machine Learning: Using Microsoft Technologies for Applied Data S...
PPTX
SQL Server 2019 Modern Data Platform.pptx
PPTX
SQL Server 2019 hotlap - WARDY IT Solutions
PDF
SQL Server 2017 Machine Learning Services
PDF
ITCamp 2018 - Andrea Martorana Tusa - Failure prediction for manufacturing in...
PPTX
Experience SQL Server 2017: The Modern Data Platform
Moving advanced analytics to your sql server databases
Sql Server Machine Learning Services - Sql Saturday Prague 2018 #SqlSatPrague
Advanced analytics with R and SQL
The Polyglot Data Scientist - Exploring R, Python, and SQL Server
The roadmap for sql server 2019
Predictive Analysis using Microsoft SQL Server R Services
SQL Server R Services: What Every SQL Professional Should Know
Overview SQL Server 2019
Microsoft Technologies for Data Science 201612
Microsoft Data Platform Airlift 2017 Rui Quintino Machine Learning with SQL S...
Microsoft Data Science Technologies 201608
introduction to sql server by moamen hany
PASS Summit - SQL Server 2017 Deep Dive
Secrets of Enterprise Data Mining: SQL Saturday Oregon 201411
Operational Machine Learning: Using Microsoft Technologies for Applied Data S...
SQL Server 2019 Modern Data Platform.pptx
SQL Server 2019 hotlap - WARDY IT Solutions
SQL Server 2017 Machine Learning Services
ITCamp 2018 - Andrea Martorana Tusa - Failure prediction for manufacturing in...
Experience SQL Server 2017: The Modern Data Platform
Ad

More from Maximiliano Accotto (20)

PDF
SQL Server 2019 Big Data Cluster
PPTX
Modernizando plataforma de bi
PPTX
Microsoft machine learning
PPTX
Machine Learning en SQL Server
PPTX
Solucion de BI en Azure
PPTX
Seguridad en sql server 2016 y 2017
PPTX
Seguridad en sql server 2016 y 2017
PPTX
Sql 2016 2017 full
PPTX
SQL on linux
PPTX
Sql 2017 net raf
PPTX
Net conf uy 2017 sql 2017
PPTX
Machine Learning en SQL Server
PPTX
SQL on Azure
PPTX
Bootcamp 2017 - SQL Server on Linux
PPTX
SQL Linux - Instalación
PPTX
Feliz 2016 ppt
PPTX
Auditoria performance SQL Server
PPTX
Workshop sql
PPTX
PPTX
TriggerDB Brochure
SQL Server 2019 Big Data Cluster
Modernizando plataforma de bi
Microsoft machine learning
Machine Learning en SQL Server
Solucion de BI en Azure
Seguridad en sql server 2016 y 2017
Seguridad en sql server 2016 y 2017
Sql 2016 2017 full
SQL on linux
Sql 2017 net raf
Net conf uy 2017 sql 2017
Machine Learning en SQL Server
SQL on Azure
Bootcamp 2017 - SQL Server on Linux
SQL Linux - Instalación
Feliz 2016 ppt
Auditoria performance SQL Server
Workshop sql
TriggerDB Brochure

Recently uploaded (20)

PPTX
Programs and apps: productivity, graphics, security and other tools
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Big Data Technologies - Introduction.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPT
Teaching material agriculture food technology
PDF
KodekX | Application Modernization Development
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
Programs and apps: productivity, graphics, security and other tools
“AI and Expert System Decision Support & Business Intelligence Systems”
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Spectroscopy.pptx food analysis technology
Big Data Technologies - Introduction.pptx
The AUB Centre for AI in Media Proposal.docx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
The Rise and Fall of 3GPP – Time for a Sabbatical?
sap open course for s4hana steps from ECC to s4
Per capita expenditure prediction using model stacking based on satellite ima...
Unlocking AI with Model Context Protocol (MCP)
Understanding_Digital_Forensics_Presentation.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Chapter 3 Spatial Domain Image Processing.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Teaching material agriculture food technology
KodekX | Application Modernization Development
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Mobile App Security Testing_ A Comprehensive Guide.pdf

Sql server machine learning

  • 1. October 4th, 5th & 6th 2018.NET Conf AR v2018 SQL Server Machine Learning Maximiliano Accotto (MVP Data Platform) Owner TriggerDB Consulting SRL www.triggerdb.com
  • 2. October 4th, 5th & 6th 2018.NET Conf AR v2018 Regular Database + App Intelligence Database + App Llevar la inteligencia a donde están los datos Application + Intelligence Database Application Intelligence + Database VS
  • 3. October 4th, 5th & 6th 2018.NET Conf AR v2018 ¿Porque ML en SQL Server? Eliminar el movimiento de datos Aprovechar la seguridad de la base de datos Ejecutar los calculos de ML en la base de datos Operación ML scripts y modelos Usar store Procedures de T-SQL Manejar los modelos en el SQL Server Performance y escalabilidad Enterprise Escalar con R y Python analytics usando multi-threading y parallel processing. SQL Server security, compliance, resource governance, query performance, always on secondaries Data Scientist Interacts directly with data SQL Developer/ DBA Manage data and analytics together SQL Transformations 010010 100100 010101 Relational data Analytics library R integration 010010 100100 010101 010010 100100 010101 Python integration
  • 4. October 4th, 5th & 6th 2018.NET Conf AR v2018 SQL Machine Learning Services • SQL Server 2016 • R support (3.2.2 version) • Microsoft R Server • SQL Server 2017 • Scoring native en TSQL usando PREDICT function • EXTERNAL LIBRARY DDL para el manejo de paquetes R • Ejecución en batch para la entrada de datos • Soporte para R (3.3.3 version) • Soporte para Python (Anaconda 3.5.2)
  • 5. October 4th, 5th & 6th 2018.NET Conf AR v2018 Any R/Python IDE Data Scientist Workstation Script Results Execution 1 3 Data Scientists - Exploración de Datos y Desarrollo de Modelos SQL Server 2 R/Python Runtime Machine Learning Services train <- RxSqlServerData(query, connectionString, computeContext) rxLogit(formula, train)
  • 6. October 4th, 5th & 6th 2018.NET Conf AR v2018 Application exec sp_execute_external_script @language = ‘Python’ , @script = -- Python code -- The stored procedure contains R or Python code and executes in-database Application Developer - Operacionalización de modelos Stored Proc call Results 1 3 Execution SQL Server 2 R/Python Runtime Machine Learning Services
  • 7. October 4th, 5th & 6th 2018.NET Conf AR v2018 Trabajo del DBA: Habilitar ML en SQL Server  Enable External scripts – Exec sp_configure ‘external scripts enabled’, 1 – RCONFIGURE SQL Server 2016 O superior
  • 8. October 4th, 5th & 6th 2018.NET Conf AR v2018 sp_execute_external_script
  • 9. October 4th, 5th & 6th 2018.NET Conf AR v2018 Tipos de salida 1. Dataset • Standard resultset of rows and columns • Data types will vary 2. Plot • Static images • Binary 3. Model • Trained models such as linear regression, naïve bayes, etc. • Binary
  • 10. October 4th, 5th & 6th 2018.NET Conf AR v2018 Realtime Predictions usando Scoring nativo • PREDICT function • No depende de R o Python runtime • Habilitado on SQL Server tanto en Windows como Linux • Uso • Single or small number of rows scoring • Highly concurrent scoring scenarios • Predict during INSERT, UPDATE, MERGE statements • Requirements • Models built using RevoScaleR or revoscalepy • rxLinMod, rxLogit, rxBTrees, rxDTree, rxDForest • Serialized using rxSerializeModel (R) or rx_serialize_model (Python)
  • 11. October 4th, 5th & 6th 2018.NET Conf AR v2018 PREDICT syntax
  • 12. October 4th, 5th & 6th 2018.NET Conf AR v2018 1,000,000 predictions per second https://blogs.technet.microsoft.com/dataplatforminsider/2016/10/11/1000000-predictions-per-second/
  • 13. October 4th, 5th & 6th 2018.NET Conf AR v2018 SQL Machine Learning Server • Soporte Multi-plataforma • Windows, Linux, Hadoop, SQL Server • Microsoft R Server • RevoScaleR, MicrosoftML, olapR, sqlrutils packages • Uso de Web services para operar. • Microsoft Machine Learning Server • Soporte de R & Python • revoscalepy, microsoftml python libraries • rxExecBy
  • 14. October 4th, 5th & 6th 2018.NET Conf AR v2018 SQL Machine Learning Server • Setup one-box configuration > az ml admin boostrap • Jupyter notebook deploy, and consume
  • 15. October 4th, 5th & 6th 2018.NET Conf AR v2018 SQL Machine Learning Server – Multi Server Configuration
  • 16. October 4th, 5th & 6th 2018.NET Conf AR v2018 SQL Server 2019 y ML (big data Cluster)
  • 17. October 4th, 5th & 6th 2018.NET Conf AR v2018 Demos
  • 18. October 4th, 5th & 6th 2018.NET Conf AR v2018 Muchas gracias http://blog.triggerdb.com/maxi maxiaccotto Maxi@triggerdb.com Maximiliano Accotto

Editor's Notes

  • #3: 2
  • #6: Microsoft Tech Summit FY17
  • #7: Microsoft Data Amp