Microsoft Ignite NZ 25-28 October 2016 SKYCITY, Auckland.

Slides:



Advertisements
Similar presentations
Introduction to Big Data and Hadoop Name Title Microsoft Corporation.
Advertisements

Training Workshop Windows Azure Platform. Presentation Outline (hidden slide): Technical Level: 200 Intended Audience: Developers Objectives (what do.
PolyBase in SQL Server 16 David J. DeWitt Rimma V. Nehme
Matt Lavery & Joanna Podgoetsky Being a DBA is cool again with SQL 2016 DAT335 A.
Warwick Rudd – Henry Rooney – How Available is SQL Server 2016? DAT33 6.
SQL Server 2016 New Innovations. Microsoft Data Platform Relational Beyond Relational On-premises Cloud Comprehensiv e Connected Choice SQL Server Azure.
PolyBase Query Hadoop with ease Sahaj Saini SQL Server, Microsoft.
SQL Server Evolution New innovations Jen Underwood Sr. Program Manager of Business Intelligence & Analytics Microsoft George Walters Sr. Technical Solutions.
PolyBase Query Hadoop with ease Sahaj Saini Program Manager, Microsoft.
SQL Server 2016 editions – what’s new Express Mission critical performance SecurityData warehousing Business intelligence Advanced Analytics Hybrid cloud.
Redmond Protocols Plugfest 2016 Casey Karst PolyBase in SQL Server 2016.
Comprehensive Flexible Global Storage and Search Responsive Available Secure Manageable Federation Coordination Consolidation Transformation Synchronization.
HDC: SQL Server 2016 New Features & Demos. Phil Brammer
PolyBase overview Speaker Name
Building ARM IaaS Application Environment
Data Platform and Analytics Foundational Training
Developing modern applications with Temporal Tables and JSON
Data Platform Modernization
Convergence /6/2018 © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Data Platform and Analytics Foundational Training
PolyBase: T-SQL Reaching Beyond the Database
Presenter Date | Location
Data Platform and Analytics Foundational Training
Examine information management in Cortana Intelligence
System Center Marketing
Creating Enterprise Grade BI Models with Azure Analysis Services
System Center Marketing
Business Critical Application Platform
Microsoft /2/2018 3:42 PM BRK3129 Query Big Data using the Expanded T-SQL footprint with PolyBase in SQL Server 2016 Casey Karst Program Manager.
Melbourne Azure Meetup
SQL 2016 new Hosting Offers Secure Database Hybrid HyperScale
Microsoft Azure: The only consistent Hybrid Cloud
Bridging the Data Science and SQL Divide for Practitioners
6/12/2018 2:19 PM BRK3245 DirectQuery in Analysis Services: best practices, performance, and use cases Marco Russo SQLBI © Microsoft Corporation. All rights.
Enable the Hybrid Data Platform
Data Platform and Analytics Foundational Training
The Model Architecture with SQL and Polybase
Microsoft Build /22/ :52 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
7/22/2018 9:21 PM BRK3270 Building a Better Data Solution: Microsoft SQL Server and Azure Data Services Joey D’Antoni Principal Consultant Denny Cherry.
Julie Strauss Senior Program Manager Microsoft
Data Platform and Analytics Foundational Training
Introduction Module 16 9/5/2018 9:26 PM
Installation and database instance essentials
SQL Server Data Tools for Visual Studio Part I: Core SQL Server Tools
Mission-critical performance with Microsoft SQL Server 2016
Integrate Power BI with Microsoft Dynamics
Business Critical Application Platform
Microsoft R Bill Jacobs
Modeling and Analytics Features Coming in Analysis Services vNext
Welcome! Power BI User Group (PUG)
Power Apps & Flow for Microsoft Dynamics SL
Overview of Azure Data Lake Store
Business Intelligence for Project Server/Online
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
Data Platform Modernization
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
Server & Tools Business
11/22/2018 1:43 PM THR3005 How to provide business insight from your data using Azure Analysis Services Peter Myers Bitwise Solutions © Microsoft Corporation.
Microsoft Connect /22/2018 9:50 PM
Welcome! Power BI User Group (PUG)
Henk van der Valk Oct.15, 2016 Level: Beginner
TechEd /15/2019 8:08 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Alex Kelly | Program Manager
Building and running HPC apps in Windows Azure
Developing for Windows Azure
Inside SQL Server Polybase
4/18/2019 9:46 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Service Template Creation from the Ground Up
Server & Tools Business
SQL Server 2019 Bringing Apache Spark to SQL Server
Presentation transcript:

Microsoft Ignite NZ 25-28 October 2016 SKYCITY, Auckland

Beyond T-SQL: non-relational features in SQL Server 2016 M384 David Lyth

Deeper insights across data Access any data Scale and manage Powerful Insights Advanced analytics PolyBase Insights from data across SQL Server and Hadoop with simplicity of T-SQL Enhanced SSIS Designer support for previous SSIS versions Support for Power Query Enterprise-grade Analysis Services Enhanced performance and scalability for analysis services Single SSDT in Visual Studio 2015 (CTP3) Build richer analytics solutions as part of your development projects in Visual Studio Enhanced MDS Excel add-in 15x faster; more granular security roles; archival options for transaction logs; and reuse entities across models Mobile BI Business insights for your on- premises data through rich visualization on mobile devices with native apps for Windows, iOS and Android Enhanced Reporting Services New modern reports with rich visualizations R integration Bringing predictive analytic capabilities to your relational database Analytics libraries Expand your “R” script library with Microsoft Azure Marketplace

Mission-critical performance Security Availability Scalability Operational analytics Insights on operational data; Works with in-memory OLTP and disk-based OLTP In-memory OLTP enhancements Greater T-SQL surface area, terabytes of memory supported, and greater number of parallel CPUs Query data store Monitor and optimize query plans Native JSON Expanded support for JSON data Temporal database support Query data as points in time Always encrypted Sensitive data remains encrypted at all times with ability to query Row-level security Apply fine-grained access control to table rows Dynamic data masking Real-time obfuscation of data to prevent unauthorized access Other enhancements Audit success/failure of database operations TDE support for storage of in- memory OLTP tables Enhanced auditing for OLTP with ability to track history of record changes Enhanced AlwaysOn Three synchronous replicas for auto failover across domains Round robin load balancing of replicas Automatic failover based on database health DTC for transactional integrity across database instances with AlwaysOn Support for SSIS with AlwaysOn Enhanced database caching Cache data with automatic, multiple TempDB files per instance in multi-core environments

9/18/2018 7:43 PM Polybase © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

PolyBase PolyBase and queries RDBMS Hadoop Provides a scalable, T-SQL-compatible query processing framework for combining data from both universes Access any data

PolyBase View in SQL Server 2016 Execute T-SQL queries against relational data in SQL Server and semi-structured data in Hadoop or Azure Blob Storage Leverage existing T-SQL skills and BI tools to gain insights from different data stores Query Results SQL Server Hadoop Azure Blob Storage Access any data

PolyBase use cases Load data Use Hadoop as an ETL tool to cleanse data before loading to data warehouse with PolyBase Interactively query Analyze relational data with semi-structured data using split-based query processing Age out data Age out data to HDFS and use it as “cold” but queryable storage Access any data

How to use PolyBase in SQL Server 2016 PolyBase Group Head Node Compute Nodes SQL 2016 PolyBase Engine PolyBase DMS Hadoop Cluster Namenode Datanode File System AB 01 PolyBase T-SQL queries submitted here Optional PolyBase queries can only refer to tables here and/or external tables here Access any data

Step 1: Set up a Hadoop cluster… Namenode Datanode File System AB 01 Hortonworks or Cloudera distributions Hadoop 2.0 or above Linux or Windows On-premises or in Azure Access any data

Step 1: …or set up an Azure Storage Blob Azure Storage Volume Azure Storage Blob (ASB) exposes an HDFS layer PolyBase reads and writes from ASB using Hadoop RecordReader/RecordWrite No compute pushdown support for ASB Access any data

Step 2: Install SQL Server Server Instances SQL 2016 PolyBase DLLs Install one or more SQL Server instances with PolyBase PolyBase DLLs (Engine and DMS) are installed and registered as Windows Services Prerequisite: User must download and install JRE (Oracle) Access any data

Step 4: Choose External Big Data Source -- different numbers map to various Hadoop flavors -- example: value 4 stands for HDP 2.x on Linux, value 5 for HDP 2.x on Windows, value 6 for CHD 5.x on Linux Values 0 - 7 Supported Big Data Sources Hortonworks HDP 1.3 - 2.3 on Linux/Windows Server Hortonworks HDP 2.4 – 2.5 on Linux Cloudera CDH 4.3, 5.1 – 5.5 on Linux Azure blob storage https://msdn.microsoft.com/en-us/library/mt143174.aspx What happens behind the scenes? Loading the right client jars to connect to Hadoop distribution Access any data

Step 5: Attach Hadoop cluster or Azure Storage Head Node Compute Nodes SQL 2016 SQL 2016 SQL 2016 SQL 2016 PolyBase Engine PolyBase DMS PolyBase DMS PolyBase DMS PolyBase DMS Azure Azure Storage Volume Hadoop Cluster Namenode Datanode File System AB 01 Access any data

Creating Polybase Objects CREATE EXTERNAL DATA SOURCE HadoopCluster WITH( TYPE = HADOOP, LOCATION = 'hdfs://10.14.0.4:8020' ); CREATE EXTERNAL FILE FORMAT CommaSeparatedFormat WITH( FORMAT_TYPE = DELIMITEDTEXT, FORMAT_OPTIONS (FIELD_TERMINATOR = ',', USE_TYPE_DEFAULT = TRUE) CREATE EXTERNAL TABLE [dbo].[SensorData]( vin varchar(255), speed int, fuel int, odometer int, city varchar(255), datatimestamp varchar(255) ) WITH( LOCATION = '/apps/hive/warehouse/sensordata', DATA_SOURCE = HadoopCluster, FILE_FORMAT = CommaSeparatedFormat Create an external data source Create an external file format Create an external table for unstructured data

Polybase Queries Query external data table as SQL data SELECT [vin], [speed], [datetimestamp] FROM dbo.SensorData [make], [model], [modelYear], FROM dbo.AutomobileData LEFT JOIN dbo.SensorData ON dbo.AutomobileData.[vin] = dbo.SensorData.[vin] Query external data table as SQL data Data returned as defined in external data table Join SQL data with external data Join data between internal and external table All TSQL commands supported PolyBase will optimize between SQL-side query and pushdown to MapReduce

PolyBase query example #1 -- select on external table (data in HDFS) SELECT * FROM Customer WHERE c_nationkey = 3 and c_acctbal < 0; Possible execution plan: EXECUTE QUERY Select * from T where T.c_nationkey =3 and T.c_acctbal < 0 3 IMPORT FROM HDFS HDFS Customer file read into T 2 CREATE temp table T Execute on compute nodes 1 Access any data

PolyBase query example #2 -- select and aggregate on external table (data in HDFS) SELECT AVG(c_acctbal) FROM Customer WHERE c_acctbal < 0 GROUP BY c_nationkey; Execution plan: What happens here? Step 1: QO compiles predicate into Java and generates MapReduce (MR) job Step 2: Engine submits MR job to Hadoop cluster. Output left in hdfsTemp. hdfsTemp <US, $-975.21> <FRA, $-119.13> <UK, $-63.52> Run MR job on Hadoop Apply filter and compute aggregate on Customer. 1 Access any data

PolyBase query example #2 -- select and aggregate on external table (data in HDFS) SELECT AVG(c_acctbal) FROM Customer WHERE c_acctbal < 0 GROUP BY c_nationkey; Execution plan: Predicate and aggregate pushed into Hadoop cluster as MapReduce job Query optimizer makes cost-based decision on what operators to push RETURN OPERATION Select * from T 4 IMPORT hdfsTEMP Read hdfsTemp into T 3 CREATE temp table T On DW compute nodes 2 hdfsTemp <US, $-975.21> <FRA, $-119.13> <UK, $-63.52> Run MR job on Hadoop Apply filter and compute aggregate on Customer. Output left in hdfsTemp 1 Access any data

Demo Using Polybase Microsoft Ignite 2016 9/18/2018 7:43 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

9/18/2018 7:43 PM JSON © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Why JSON in SQL ? Number Customer Price Quantity SO43659 MSFT 59.99 1 [ { "Number":"SO43659", “Customer":“MSFT", "Price":59.99, "Quantity":1 }, { "Number":"SO43661", “Customer":“Nokia“, "Price":24.99, "Quantity":3 } ] Number Customer Price Quantity SO43659 MSFT 59.99 1 SO43661 Nokia 24.99 3

Features Number Date Customer Price Quantity Built-in functions ISJSON 9/18/2018 Features Built-in functions ISJSON JSON_VALUE JSON_MODIFY JSON_QUERY OPENJSON Transforms JSON text to table [ { "Number":"SO43659", "Date":"2011-05-31T00:00:00" "AccountNumber":"AW29825", "Price":59.99, "Quantity":1 }, { "Number":"SO43661", "Date":"2011-06-01T00:00:00“ "AccountNumber":"AW73565“, "Price":24.99, "Quantity":3 } ] Number Date Customer Price Quantity SO43659 2011-05-31T00:00:00 MSFT 59.99 1 SO43661 2011-06-01T00:00:00 Nokia 24.99 3 FOR JSON Formats result set as JSON text. © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

FOR JSON In PATH mode dot syntax - 'Item.Price' – formats nested output.

Query JSON data Built-in functions for JSON: ISJSON - valid JSON ? SELECT id, json_col FROM tab1 WHERE ISJSON(json_col) > 0 JSON_VALUE extracts scalar value SET @town = JSON_VALUE(@jsonInfo, '$.info.address.town') JSON_QUERY extracts an object or array SELECT FirstName, LastName, JSON_QUERY(jsonInfo, '$.info.address') AS Address FROM Person.Person ORDER BY LastName

JSON in SQL Storage Indexes Compatibility ColumnStore NVARCHAR type 9/18/2018 7:43 PM JSON in SQL Storage NVARCHAR type Collation support Indexes B-Tree on computed columns Full Text Search Compatibility Works with any feature that supports NVARCHAR type Works with any client driver ColumnStore Compression & Analytics © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Demo Using JSON Microsoft Ignite 2016 9/18/2018 7:43 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

9/18/2018 7:43 PM R © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

What is R? Language Platform Ecosystem Community A programming language for statistics, analytics, and data science A data visualization framework Provided as Open Source Community Used by 2.5M+ data scientists, statisticians and analysts Taught in most university statistics programs New and recent graduates prefer it Active and thriving user groups across the world Ecosystem CRAN: 7000+ freely available algorithms, test data and evaluation Many of these are applicable to big data if scaled

Deploying Analytics On-Prem in SQL 2016 Model & Deploy In SQL16: Complete Lifecycle Deploy via BI Tools or Applications Advantages: No Data Movement SQL Skill Reuse Operational Stability SMP Parallel Performance SQL 2016 Operationalize Model Prepare

Installation Install option “R Services” Extra “I consent” 9/18/2018 7:43 PM Installation Install option “R Services” (Standalone only) Extra “I consent” /IACCEPTROPENLICENSEAGREEMENT …download and install Microsoft R Open Exec sp_configure 'external scripts enabled', 1 © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

New things Launchpad service Local Users 9/18/2018 7:43 PM New things Launchpad service Local Users 20 accounts in SQLRUserGroup GRANT EXECUTE ANY EXTERNAL SCRIPT © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

R Integration into SQL 2016 Architecture RRO RRE SQL Server Trusted Launchpad (MSLP$SQL16) Sqlsrvr.exe Launch External Process 2 Launch RTerm.exe BxlServer.exe (MSLP$SQL16) (MSLP$SQL16) Rlauncher.dll R.dll 4 SQL/R Reader, Writer, Converter 3 RxLink.dll (Service Account) TCP Data Channel 5 SqlSatellite.dll

Running R from T-SQL exec sp_execute_external_script @language =N'R', 9/18/2018 7:43 PM Running R from T-SQL exec sp_execute_external_script @language =N'R', @script=N'OutputDataSet<-InputDataSet', -- the R… @input_data_1 =N'select name from sys.databases' with result sets (([name] char(100))); © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Running R from Visual Studio 9/18/2018 7:43 PM Running R from Visual Studio © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Demo Using R Microsoft Ignite 2016 9/18/2018 7:43 PM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

9/18/2018 7:43 PM © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.