SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
SQL Server Data
Virtualization with Polybase
Gianluca Hotz
ghotz@ugiss.org
Sponsors
Chi sono?
• Gianluca Hotz | @glhotz | ghotz@ugiss.org
• Consulente indipendente
• 20+ anni su SQL Server (dalla 4.21 nel 1996)
• Modellazione e sviluppo database, dimensionamento e amministrazione
database server, aggiornamenti e migrazioni, performance tuning
• Community
• 20+ anni Microsoft MVP SQL Server/Data Platform (dal 1998)
• VMware Experts SQL Server
• Fondatore e presidente UGISS (PASS Chapter)
• Co-organizzatore DAMAG Meetup Community
Problema
• Sistemi DSS/OLAP/DWH necessitano di processi
• ETL (Extract, Transform, Load)
• ELT (Extract, Load, Transform)
• Causano «Data Movement»!
• Mitigato da virtualizzazione accesso ai dati
Data Movement
• Costi
• Costi storage duplicati
• Sforzo per costruire/mantenere pipeline dati
• Velocità
• Tempo integrazione nuovi dati -> sfuggono opportunità!
• Latenza disponibilità dati -> sfuggono opportunità
• Sicurezza
• Superfice di attacco più ampia
• Potenziale inconsistenza politiche di sicurezza
• Qualità
• Pipeline dati possono introdurre problemi di qualità…
• Compliance
• Maggiori problemi di governance
Virtualizzazione
• https://en.wikipedia.org/wiki/Data_virtualization
• “Unlike the traditional extract, transform, load (ETL) process, the data remains
in place, and real-time access is given to the source system for the data. This
reduces the risk of data errors, of the workload moving data around that may
never be used, and it does not attempt to impose a single data model on the
data”
▪ Dati rimangono dove sono
▪ Viene dato accesso in tempo reale al dato
▪ Non si cerca di imporre un solo modello…
Virtualizzazione e SQL Server
• Open Data Service Gateway (< SQL Server 7.0!!)
• Linked Servers
• PolyBase
Linked Servers
• Componenti
• OLE DB provider
• OLE DB data source
• Utilizzo
• Accesso a fonti dati esterne eterogenee
• Query e transazioni distribuite
• Supporto
• SQL Server
• Azure SQL Database Managed Instance
• limitato SQL Database/SQL Database M.I./SQL Server
DEMO:
Linked Servers
PolyBase
• Distributed Compute Engine
• Integrato con SQL Server
• Combina fonti eterogenee tramite
query distribuite
• Componenti Virtualizzazione
• External Data Source
• External Tables
Supporto PolyBase
• SQL Server 2016+
• Azure Blob Storage, Hadoop (Cloudera or Hortonworks)
• (SQL Server 2017+)
• Operazioni BULK INSERT/OPENROWSET Blob Storage
• SQL Server 2019
• SQL Server (all flavors), Oracle, Teradata, MongoDB, CosmosDB (Mongo API)
• ODBC Generic Type (e.g. DB2, SAP Hana, Excel, …)
Architettura PolyBase
SQL Engine
Polybase
Engine
Polybase Data
Movement
Service
SQL Engine
Polybase
Engine
Polybase Data
Movement
Service
SQL Engine
Polybase
Engine
Polybase Data
Movement
Service
mpdwsvc.exe
DEMO: PolyBase
PolyBase con Azure SQL Database
• Bug nella versione 2019 RTM
• https://github.com/MicrosoftDocs/sql-docs/issues/3727
• Bisogna specificare database nel data source
• CONNECTION_OPTIONS = 'Database=pbdemo’
• Fix non documentato nella GDR
• https://support.microsoft.com/en-us/help/4517790
Scale-Out con Linked Server
• Distributed Partioned Views
• Aka Federated Database Server in SQL Server 2000
• Partizionamento orizzontale tramite viste
• Tabelle con partizioni dati distribuite su più istanze
• Vincoli CHECK identificano la partizione
• Viste su tutti i nodi con SELECT * […] UNION ALL
• Query Processor riconosce lo scenario
• Distribuisce il carico eseguendo query remote/locali
• Predicato deve operare su colonna del vincolo CHECK
• Disponibili ancora solo con edizione Enterprise
• Funzionalità poco documentata…
DEMO: Viste partizionate distribuite
DEMO: PolyBase Scale-Out Groups
A confronto
External Tables
Database Scoped
ODBC Drivers
Read-only*
Scale out queries with push-down
Failover with AG
Basic authentication
Distributed Transactions not supported
Better for OLAP workloads
Linked Servers
Instance Scoped
OLEDB Providers
Read/write
Single threaded queries with (limited) push-down
Requires separate config from AG
Basic and integrated authentication
Distributed Transactions supported
Better for OLTP workloads
Scale-Out OLTP Azure SQL Database
• Elastic Database Queries
• Supporto T-SQL per query distribuite
• CREATE EXTERNAL DATA SOURCE
• CREATE EXTERNAL TABLE
• Partizionamento verticale: «cross-
database queries»
• TYPE = RDBMS
• Partizionamento orizzontale:
«Sharding»
• TYPE = SHARD_MAP_MANAGER
• https://azure.microsoft.com/en-
us/documentation/articles/sql-
database-elastic-query-overview
Scale-Out OLAP
• Azure Synapse Analytics
• aka Azure SQL Data Warehouse
• aka APS/PDW in Azure
• PolyBase è nato qui, principalmente per integrazione HDFS
Altre soluzioni virtualizzazione OLAP
• Power BI
• Limite memoria portato da 10GB a 400GB
• 20-30% circa per esecuzione query
• https://docs.microsoft.com/en-us/power-bi/power-bi-data-sources
• Azure Analysis Services
• https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-
datasource
• On-Premise Data Gateway
• Può essere usato da Power BI o Azure Analysis Service
• https://docs.microsoft.com/en-us/data-integration/gateway/service-gateway-
onprem
SQL Server Big Data Cluster
Compute pool
SQL Compute
Node
SQL Compute
Node
SQL Compute
Node
…
Compute pool
SQL Compute
Node
IoT data
Persistent storage
Kubernetes pod
… SQL
Server
Spark
HDFS Data Node
SQL
Server
Spark
HDFS Data Node
SQL
Server
Spark
HDFS Data Node
Directly
read from
HDFS
Storage pool
SQL Server
master instance
Node Node Node Node Node Node Node
Analytics
Custom
apps BI
SQL
Data Mart (Cache)
SQL Data
Node
SQL Data
Node
Compute pool
SQL Compute
Node
Storage Storage
https://docs.microsoft.com/en-us/sql/big-data-cluster/big-data-cluster-overview
Risorse

Weitere ähnliche Inhalte

Was ist angesagt?

SQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: SicurezzaSQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: SicurezzaGianluca Hotz
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databasesGianluca Hotz
 
SQL Server Failover Cluster Instances con Amazon FSx in AWS
SQL Server Failover Cluster Instances con Amazon FSx in AWSSQL Server Failover Cluster Instances con Amazon FSx in AWS
SQL Server Failover Cluster Instances con Amazon FSx in AWSGianluca Hotz
 
Azure SQL Database Ledger
Azure SQL Database LedgerAzure SQL Database Ledger
Azure SQL Database LedgerGianluca Hotz
 
Mettere in sicurezza ambienti sql server
Mettere in sicurezza ambienti sql serverMettere in sicurezza ambienti sql server
Mettere in sicurezza ambienti sql serverGianluca Hotz
 
SQL Server Workload Profiling
SQL Server Workload ProfilingSQL Server Workload Profiling
SQL Server Workload ProfilingGianluca Hotz
 
Best Practices on SQL Server
Best Practices on SQL ServerBest Practices on SQL Server
Best Practices on SQL ServerGianluca Hotz
 
SQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Failover Cluster Instances con Azure Managed DisksSQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Failover Cluster Instances con Azure Managed DisksGianluca Hotz
 
SQL Server Modern Query Processing
SQL Server Modern Query ProcessingSQL Server Modern Query Processing
SQL Server Modern Query ProcessingGianluca Hotz
 
Sql start!2019 Migliorare la produttività per lo sviluppo su SQL Server
Sql start!2019 Migliorare la produttività per lo sviluppo su SQL ServerSql start!2019 Migliorare la produttività per lo sviluppo su SQL Server
Sql start!2019 Migliorare la produttività per lo sviluppo su SQL ServerAlessandro Alpi
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databasesGianluca Hotz
 
Db2 11.1: l'evoluzione del Database secondo IBM
Db2 11.1: l'evoluzione del Database secondo IBMDb2 11.1: l'evoluzione del Database secondo IBM
Db2 11.1: l'evoluzione del Database secondo IBMJürgen Ambrosi
 
Code quality e test automatizzati con JavaScript
Code quality e test automatizzati con JavaScriptCode quality e test automatizzati con JavaScript
Code quality e test automatizzati con JavaScriptRoberto Messora
 
Azure Synapse: data lake & modern data warehouse dalla A alla Z
Azure Synapse: data lake &  modern data warehouse dalla A alla ZAzure Synapse: data lake &  modern data warehouse dalla A alla Z
Azure Synapse: data lake & modern data warehouse dalla A alla ZRoberto Messora
 
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL DatabaseEmanuele Zanchettin
 
Cassandra + Hadoop: Analisi Batch con Apache Cassandra
Cassandra + Hadoop: Analisi Batch con Apache CassandraCassandra + Hadoop: Analisi Batch con Apache Cassandra
Cassandra + Hadoop: Analisi Batch con Apache CassandraJeremy Hanna
 
Azure for Game Developers
Azure for Game DevelopersAzure for Game Developers
Azure for Game DevelopersMarco Parenzan
 
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL DatabaseEmanuele Zanchettin
 

Was ist angesagt? (20)

SQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: SicurezzaSQL Server Back to Basics: Sicurezza
SQL Server Back to Basics: Sicurezza
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databases
 
SQL Server Failover Cluster Instances con Amazon FSx in AWS
SQL Server Failover Cluster Instances con Amazon FSx in AWSSQL Server Failover Cluster Instances con Amazon FSx in AWS
SQL Server Failover Cluster Instances con Amazon FSx in AWS
 
Azure SQL Database Ledger
Azure SQL Database LedgerAzure SQL Database Ledger
Azure SQL Database Ledger
 
Mettere in sicurezza ambienti sql server
Mettere in sicurezza ambienti sql serverMettere in sicurezza ambienti sql server
Mettere in sicurezza ambienti sql server
 
SQL Server Workload Profiling
SQL Server Workload ProfilingSQL Server Workload Profiling
SQL Server Workload Profiling
 
Best Practices on SQL Server
Best Practices on SQL ServerBest Practices on SQL Server
Best Practices on SQL Server
 
Data flow
Data flowData flow
Data flow
 
SQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Failover Cluster Instances con Azure Managed DisksSQL Server Failover Cluster Instances con Azure Managed Disks
SQL Server Failover Cluster Instances con Azure Managed Disks
 
SQL Server Modern Query Processing
SQL Server Modern Query ProcessingSQL Server Modern Query Processing
SQL Server Modern Query Processing
 
Sql start!2019 Migliorare la produttività per lo sviluppo su SQL Server
Sql start!2019 Migliorare la produttività per lo sviluppo su SQL ServerSql start!2019 Migliorare la produttività per lo sviluppo su SQL Server
Sql start!2019 Migliorare la produttività per lo sviluppo su SQL Server
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databases
 
Db2 11.1: l'evoluzione del Database secondo IBM
Db2 11.1: l'evoluzione del Database secondo IBMDb2 11.1: l'evoluzione del Database secondo IBM
Db2 11.1: l'evoluzione del Database secondo IBM
 
Code quality e test automatizzati con JavaScript
Code quality e test automatizzati con JavaScriptCode quality e test automatizzati con JavaScript
Code quality e test automatizzati con JavaScript
 
Azure Synapse: data lake & modern data warehouse dalla A alla Z
Azure Synapse: data lake &  modern data warehouse dalla A alla ZAzure Synapse: data lake &  modern data warehouse dalla A alla Z
Azure Synapse: data lake & modern data warehouse dalla A alla Z
 
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
 
Cassandra + Hadoop: Analisi Batch con Apache Cassandra
Cassandra + Hadoop: Analisi Batch con Apache CassandraCassandra + Hadoop: Analisi Batch con Apache Cassandra
Cassandra + Hadoop: Analisi Batch con Apache Cassandra
 
Azure for Game Developers
Azure for Game DevelopersAzure for Game Developers
Azure for Game Developers
 
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database2014.11.14 Implementare e mantenere un progetto Azure SQL Database
2014.11.14 Implementare e mantenere un progetto Azure SQL Database
 
Azure sql database
Azure sql databaseAzure sql database
Azure sql database
 

Ähnlich wie SQL Server Data Virtualization with polybase

Implementare e mantenere un progetto azure sql database v.2
Implementare e mantenere un progetto azure sql database v.2Implementare e mantenere un progetto azure sql database v.2
Implementare e mantenere un progetto azure sql database v.2Emanuele Zanchettin
 
Novità di SQL Server 2017
Novità di SQL Server 2017Novità di SQL Server 2017
Novità di SQL Server 2017Gianluca Hotz
 
Multitenancy con SQL Server e Azure SQL Database
Multitenancy con SQL Server e Azure SQL DatabaseMultitenancy con SQL Server e Azure SQL Database
Multitenancy con SQL Server e Azure SQL DatabaseGianluca Hotz
 
SQL Server Benchmarking, Baselining and Workload Analysis
SQL Server Benchmarking, Baselining and Workload AnalysisSQL Server Benchmarking, Baselining and Workload Analysis
SQL Server Benchmarking, Baselining and Workload AnalysisGianluca Sartori
 
Metadata Driven Pipeline with Microsoft Fabric
Metadata Driven Pipeline  with Microsoft FabricMetadata Driven Pipeline  with Microsoft Fabric
Metadata Driven Pipeline with Microsoft FabricMarco Pozzan
 
IaaS and PaaS relational databases in the cloud
IaaS and PaaS relational databases in the cloudIaaS and PaaS relational databases in the cloud
IaaS and PaaS relational databases in the cloudGianluca Hotz
 
Microsoft SQL Server PaaS (Platform as a Service)
Microsoft SQL Server PaaS (Platform as a Service)Microsoft SQL Server PaaS (Platform as a Service)
Microsoft SQL Server PaaS (Platform as a Service)Gianluca Hotz
 
WeWantWeb - WCF Data Services
WeWantWeb - WCF Data ServicesWeWantWeb - WCF Data Services
WeWantWeb - WCF Data ServicesDomusDotNet
 
Power BI: Introduzione ai dataflow e alla preparazione dei dati self-service
Power BI: Introduzione ai dataflow e alla preparazione dei dati self-servicePower BI: Introduzione ai dataflow e alla preparazione dei dati self-service
Power BI: Introduzione ai dataflow e alla preparazione dei dati self-serviceMarco Pozzan
 
Quanto mi costa SQL Pool Serverless Synapse
Quanto mi costa SQL Pool Serverless SynapseQuanto mi costa SQL Pool Serverless Synapse
Quanto mi costa SQL Pool Serverless SynapseMarco Pozzan
 
OCP-Architettura e caratteristiche della PaaS
OCP-Architettura e caratteristiche della PaaSOCP-Architettura e caratteristiche della PaaS
OCP-Architettura e caratteristiche della PaaSopencityplatform
 
Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015Codemotion
 
JBoss Data Grid Tech Lab
JBoss Data Grid Tech LabJBoss Data Grid Tech Lab
JBoss Data Grid Tech LabUgo Landini
 
Il cielo è sempre più azure
Il cielo è sempre più azureIl cielo è sempre più azure
Il cielo è sempre più azureKlab
 
Azure Synapse Analytics for your IoT Solutions
Azure Synapse Analytics for your IoT SolutionsAzure Synapse Analytics for your IoT Solutions
Azure Synapse Analytics for your IoT SolutionsMarco Parenzan
 
Azure No-Sql approach: DocumentDB
Azure No-Sql approach: DocumentDBAzure No-Sql approach: DocumentDB
Azure No-Sql approach: DocumentDBDavide Benvegnù
 

Ähnlich wie SQL Server Data Virtualization with polybase (20)

Implementare e mantenere un progetto azure sql database v.2
Implementare e mantenere un progetto azure sql database v.2Implementare e mantenere un progetto azure sql database v.2
Implementare e mantenere un progetto azure sql database v.2
 
Novità di SQL Server 2017
Novità di SQL Server 2017Novità di SQL Server 2017
Novità di SQL Server 2017
 
Multitenancy con SQL Server e Azure SQL Database
Multitenancy con SQL Server e Azure SQL DatabaseMultitenancy con SQL Server e Azure SQL Database
Multitenancy con SQL Server e Azure SQL Database
 
SQL Server Benchmarking, Baselining and Workload Analysis
SQL Server Benchmarking, Baselining and Workload AnalysisSQL Server Benchmarking, Baselining and Workload Analysis
SQL Server Benchmarking, Baselining and Workload Analysis
 
Dominopoint meet the experts 2015 - XPages
Dominopoint   meet the experts 2015 - XPagesDominopoint   meet the experts 2015 - XPages
Dominopoint meet the experts 2015 - XPages
 
Metadata Driven Pipeline with Microsoft Fabric
Metadata Driven Pipeline  with Microsoft FabricMetadata Driven Pipeline  with Microsoft Fabric
Metadata Driven Pipeline with Microsoft Fabric
 
IaaS and PaaS relational databases in the cloud
IaaS and PaaS relational databases in the cloudIaaS and PaaS relational databases in the cloud
IaaS and PaaS relational databases in the cloud
 
Microsoft SQL Server PaaS (Platform as a Service)
Microsoft SQL Server PaaS (Platform as a Service)Microsoft SQL Server PaaS (Platform as a Service)
Microsoft SQL Server PaaS (Platform as a Service)
 
WeWantWeb - WCF Data Services
WeWantWeb - WCF Data ServicesWeWantWeb - WCF Data Services
WeWantWeb - WCF Data Services
 
Power BI: Introduzione ai dataflow e alla preparazione dei dati self-service
Power BI: Introduzione ai dataflow e alla preparazione dei dati self-servicePower BI: Introduzione ai dataflow e alla preparazione dei dati self-service
Power BI: Introduzione ai dataflow e alla preparazione dei dati self-service
 
Quanto mi costa SQL Pool Serverless Synapse
Quanto mi costa SQL Pool Serverless SynapseQuanto mi costa SQL Pool Serverless Synapse
Quanto mi costa SQL Pool Serverless Synapse
 
OCP-Architettura e caratteristiche della PaaS
OCP-Architettura e caratteristiche della PaaSOCP-Architettura e caratteristiche della PaaS
OCP-Architettura e caratteristiche della PaaS
 
Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015Infinispan codemotion - Codemotion Rome 2015
Infinispan codemotion - Codemotion Rome 2015
 
OCP Paas_ultima
OCP Paas_ultimaOCP Paas_ultima
OCP Paas_ultima
 
Power bi
Power biPower bi
Power bi
 
JBoss Data Grid Tech Lab
JBoss Data Grid Tech LabJBoss Data Grid Tech Lab
JBoss Data Grid Tech Lab
 
Il cielo è sempre più azure
Il cielo è sempre più azureIl cielo è sempre più azure
Il cielo è sempre più azure
 
Corsi Tableau 10 by Ecoh Media
Corsi Tableau 10 by Ecoh MediaCorsi Tableau 10 by Ecoh Media
Corsi Tableau 10 by Ecoh Media
 
Azure Synapse Analytics for your IoT Solutions
Azure Synapse Analytics for your IoT SolutionsAzure Synapse Analytics for your IoT Solutions
Azure Synapse Analytics for your IoT Solutions
 
Azure No-Sql approach: DocumentDB
Azure No-Sql approach: DocumentDBAzure No-Sql approach: DocumentDB
Azure No-Sql approach: DocumentDB
 

Mehr von Gianluca Hotz

SQL Server 2022 Programmability & Performance
SQL Server 2022 Programmability & PerformanceSQL Server 2022 Programmability & Performance
SQL Server 2022 Programmability & PerformanceGianluca Hotz
 
SQL Server 2022 Intelligent Query Processing
SQL Server 2022 Intelligent Query ProcessingSQL Server 2022 Intelligent Query Processing
SQL Server 2022 Intelligent Query ProcessingGianluca Hotz
 
Le novità di SQL Server 2022
Le novità di SQL Server 2022Le novità di SQL Server 2022
Le novità di SQL Server 2022Gianluca Hotz
 
Data Integrity with SQL Database Ledger
Data Integrity with SQL Database LedgerData Integrity with SQL Database Ledger
Data Integrity with SQL Database LedgerGianluca Hotz
 
Best Practices for Running Microsoft SQL Server on AWS
Best Practices for Running Microsoft SQL Server on AWSBest Practices for Running Microsoft SQL Server on AWS
Best Practices for Running Microsoft SQL Server on AWSGianluca Hotz
 
SQL Server Modernization
SQL Server ModernizationSQL Server Modernization
SQL Server ModernizationGianluca Hotz
 
Le novità di sql server 2019
Le novità di sql server 2019Le novità di sql server 2019
Le novità di sql server 2019Gianluca Hotz
 
SQL Server 2019 CTP 2.5
SQL Server 2019 CTP 2.5SQL Server 2019 CTP 2.5
SQL Server 2019 CTP 2.5Gianluca Hotz
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databasesGianluca Hotz
 
SQL Server 2019 CTP2.4
SQL Server 2019 CTP2.4SQL Server 2019 CTP2.4
SQL Server 2019 CTP2.4Gianluca Hotz
 
SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2Gianluca Hotz
 

Mehr von Gianluca Hotz (11)

SQL Server 2022 Programmability & Performance
SQL Server 2022 Programmability & PerformanceSQL Server 2022 Programmability & Performance
SQL Server 2022 Programmability & Performance
 
SQL Server 2022 Intelligent Query Processing
SQL Server 2022 Intelligent Query ProcessingSQL Server 2022 Intelligent Query Processing
SQL Server 2022 Intelligent Query Processing
 
Le novità di SQL Server 2022
Le novità di SQL Server 2022Le novità di SQL Server 2022
Le novità di SQL Server 2022
 
Data Integrity with SQL Database Ledger
Data Integrity with SQL Database LedgerData Integrity with SQL Database Ledger
Data Integrity with SQL Database Ledger
 
Best Practices for Running Microsoft SQL Server on AWS
Best Practices for Running Microsoft SQL Server on AWSBest Practices for Running Microsoft SQL Server on AWS
Best Practices for Running Microsoft SQL Server on AWS
 
SQL Server Modernization
SQL Server ModernizationSQL Server Modernization
SQL Server Modernization
 
Le novità di sql server 2019
Le novità di sql server 2019Le novità di sql server 2019
Le novità di sql server 2019
 
SQL Server 2019 CTP 2.5
SQL Server 2019 CTP 2.5SQL Server 2019 CTP 2.5
SQL Server 2019 CTP 2.5
 
Azure PaaS databases
Azure PaaS databasesAzure PaaS databases
Azure PaaS databases
 
SQL Server 2019 CTP2.4
SQL Server 2019 CTP2.4SQL Server 2019 CTP2.4
SQL Server 2019 CTP2.4
 
SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2SQL Server 2019 ctp2.2
SQL Server 2019 ctp2.2
 

SQL Server Data Virtualization with polybase

  • 1. SQL Server Data Virtualization with Polybase Gianluca Hotz ghotz@ugiss.org
  • 3. Chi sono? • Gianluca Hotz | @glhotz | ghotz@ugiss.org • Consulente indipendente • 20+ anni su SQL Server (dalla 4.21 nel 1996) • Modellazione e sviluppo database, dimensionamento e amministrazione database server, aggiornamenti e migrazioni, performance tuning • Community • 20+ anni Microsoft MVP SQL Server/Data Platform (dal 1998) • VMware Experts SQL Server • Fondatore e presidente UGISS (PASS Chapter) • Co-organizzatore DAMAG Meetup Community
  • 4. Problema • Sistemi DSS/OLAP/DWH necessitano di processi • ETL (Extract, Transform, Load) • ELT (Extract, Load, Transform) • Causano «Data Movement»! • Mitigato da virtualizzazione accesso ai dati
  • 5. Data Movement • Costi • Costi storage duplicati • Sforzo per costruire/mantenere pipeline dati • Velocità • Tempo integrazione nuovi dati -> sfuggono opportunità! • Latenza disponibilità dati -> sfuggono opportunità • Sicurezza • Superfice di attacco più ampia • Potenziale inconsistenza politiche di sicurezza • Qualità • Pipeline dati possono introdurre problemi di qualità… • Compliance • Maggiori problemi di governance
  • 6. Virtualizzazione • https://en.wikipedia.org/wiki/Data_virtualization • “Unlike the traditional extract, transform, load (ETL) process, the data remains in place, and real-time access is given to the source system for the data. This reduces the risk of data errors, of the workload moving data around that may never be used, and it does not attempt to impose a single data model on the data” ▪ Dati rimangono dove sono ▪ Viene dato accesso in tempo reale al dato ▪ Non si cerca di imporre un solo modello…
  • 7. Virtualizzazione e SQL Server • Open Data Service Gateway (< SQL Server 7.0!!) • Linked Servers • PolyBase
  • 8. Linked Servers • Componenti • OLE DB provider • OLE DB data source • Utilizzo • Accesso a fonti dati esterne eterogenee • Query e transazioni distribuite • Supporto • SQL Server • Azure SQL Database Managed Instance • limitato SQL Database/SQL Database M.I./SQL Server
  • 10. PolyBase • Distributed Compute Engine • Integrato con SQL Server • Combina fonti eterogenee tramite query distribuite • Componenti Virtualizzazione • External Data Source • External Tables
  • 11. Supporto PolyBase • SQL Server 2016+ • Azure Blob Storage, Hadoop (Cloudera or Hortonworks) • (SQL Server 2017+) • Operazioni BULK INSERT/OPENROWSET Blob Storage • SQL Server 2019 • SQL Server (all flavors), Oracle, Teradata, MongoDB, CosmosDB (Mongo API) • ODBC Generic Type (e.g. DB2, SAP Hana, Excel, …)
  • 12. Architettura PolyBase SQL Engine Polybase Engine Polybase Data Movement Service SQL Engine Polybase Engine Polybase Data Movement Service SQL Engine Polybase Engine Polybase Data Movement Service mpdwsvc.exe
  • 14. PolyBase con Azure SQL Database • Bug nella versione 2019 RTM • https://github.com/MicrosoftDocs/sql-docs/issues/3727 • Bisogna specificare database nel data source • CONNECTION_OPTIONS = 'Database=pbdemo’ • Fix non documentato nella GDR • https://support.microsoft.com/en-us/help/4517790
  • 15. Scale-Out con Linked Server • Distributed Partioned Views • Aka Federated Database Server in SQL Server 2000 • Partizionamento orizzontale tramite viste • Tabelle con partizioni dati distribuite su più istanze • Vincoli CHECK identificano la partizione • Viste su tutti i nodi con SELECT * […] UNION ALL • Query Processor riconosce lo scenario • Distribuisce il carico eseguendo query remote/locali • Predicato deve operare su colonna del vincolo CHECK • Disponibili ancora solo con edizione Enterprise • Funzionalità poco documentata…
  • 18. A confronto External Tables Database Scoped ODBC Drivers Read-only* Scale out queries with push-down Failover with AG Basic authentication Distributed Transactions not supported Better for OLAP workloads Linked Servers Instance Scoped OLEDB Providers Read/write Single threaded queries with (limited) push-down Requires separate config from AG Basic and integrated authentication Distributed Transactions supported Better for OLTP workloads
  • 19. Scale-Out OLTP Azure SQL Database • Elastic Database Queries • Supporto T-SQL per query distribuite • CREATE EXTERNAL DATA SOURCE • CREATE EXTERNAL TABLE • Partizionamento verticale: «cross- database queries» • TYPE = RDBMS • Partizionamento orizzontale: «Sharding» • TYPE = SHARD_MAP_MANAGER • https://azure.microsoft.com/en- us/documentation/articles/sql- database-elastic-query-overview
  • 20. Scale-Out OLAP • Azure Synapse Analytics • aka Azure SQL Data Warehouse • aka APS/PDW in Azure • PolyBase è nato qui, principalmente per integrazione HDFS
  • 21. Altre soluzioni virtualizzazione OLAP • Power BI • Limite memoria portato da 10GB a 400GB • 20-30% circa per esecuzione query • https://docs.microsoft.com/en-us/power-bi/power-bi-data-sources • Azure Analysis Services • https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services- datasource • On-Premise Data Gateway • Può essere usato da Power BI o Azure Analysis Service • https://docs.microsoft.com/en-us/data-integration/gateway/service-gateway- onprem
  • 22. SQL Server Big Data Cluster Compute pool SQL Compute Node SQL Compute Node SQL Compute Node … Compute pool SQL Compute Node IoT data Persistent storage Kubernetes pod … SQL Server Spark HDFS Data Node SQL Server Spark HDFS Data Node SQL Server Spark HDFS Data Node Directly read from HDFS Storage pool SQL Server master instance Node Node Node Node Node Node Node Analytics Custom apps BI SQL Data Mart (Cache) SQL Data Node SQL Data Node Compute pool SQL Compute Node Storage Storage https://docs.microsoft.com/en-us/sql/big-data-cluster/big-data-cluster-overview