PolyBase is a technology that accesses and combines(整合) both non-relational and relational data, all from within SQL Server. It allows you to run queries on external data in Hadoop or Azure blob storage. The queries are optimized(优化) to push computation to Hadoop

目录:

  • feature
  • Performance
  • cale-out groups
  • use cases
  • 参考资料

feature:


  • By simply using Transact-SQL (T-SQL) statements, you an import and export data back and forth(反复、来回) between relational tables in SQL Server and non-relational data stored in Hadoop or Azure Blob Storage. You can also query the external data from within a T-SQL query and join it with relational data
  • Query data stored in Hadoop: Users are storing data in cost-effective distributed and scalable systems(可伸缩系统), such as Hadoop. PolyBase makes it easy to query the data by using T-SQL
  • Query data stored in Azure blob storage: Azure blob storage is a convenient(方便) place to store data for use by Azure services. PolyBase makes it easy to access the data by using T-SQL.
  • Import data from Hadoop or Azure blob storage: Leverage the speed of Microsoft SQL's columnstore technology and analysis capabilities by importing data from Hadoop or Azure blob storage into relational tables. There is no need for a separate ETL or import tool
  • Export data to Hadoop or Azure blob storage: Archive data to Hadoop or Azure blob storage to achieve cost-effective storage and keep it online for easy access
  • Integrate with BI tools:Use PolyBase with Microsoft’s business intelligence and analysis stack, or use any third party tools that is compatible with SQL Server

Performance:


  • Push computation to Hadoop:The query optimizer (查询优化器)makes a cost-based decision to push computation to Hadoop when doing so will improve query performance. It uses statistics on external tables to make the cost-based decision. Pushing computation creates MapReduce jobs and leverages Hadoop's distributed computational resources.
  • Scale compute resources:To improve query performance, you can use SQL Server PolyBase scale-out groups. This enables parallel data transfer between SQL Server instances and Hadoop nodes, and it adds compute resources for operating on the external data

cale-out groups:


  • polybase 使用单一的sqlserver 实例来处理基于hadoop 或 Azure blobl Storage 的大量数据集时,可能会出现性能瓶颈, group feature允许用户创建 sqlserver instance 集群来处理扩展的大数据集
  • headnode:  The head node contains the SQL Server instance to which PolyBase queries are submitted. Each PolyBase group can have only one head node. A head node is a logical group of SQL Database Engine, PolyBase Engine and PolyBase Data Movement Service on the SQL Server instance
  • Compute node:A compute node contains the SQL Server instance that assists with(帮助) scale-out query processing on external data. A compute node is a logical group of SQL Server and the PolyBase data movement service on the SQL Server instance. A PolyBase group can have multiple compute nodes
  • Distributed query processing:
    1. PolyBase queries are submitted to the SQL Server on the head node. The part of the query that refers to external tables is handed-off (移交)to the PolyBase engine
    2. The PolyBase engine is the key component behind PolyBase queries. It parses the query on external data, generates the query plan and distributes the work to the data movement service on the compute nodes for execution. After completion of the work, it receives the results from the compute nodes and submits them to SQL Server for processing and returning to the client
    3. The PolyBase data movement service receives instructions(指令) from the PolyBase engine and transfers data between HDFS and SQL Server, and between SQL Server instances on the head and compute nodes
  • Editions availability:
    1. After setup of SQL Server, the instance can be designated(指定) as either a head node or a compute node.
    2. The choice depends on which version of SQL Server PolyBase is running on.
    3. On an Enterprise edition installation, the instance can be designated either as head node or a compute node.
    4. On a Standard edition, the instance can only be designated as a compute node

use cases


  • polybase primary use cases 如下图:
  • (a) query submitted to PDW requires “unstructured” data from Hadoop for its execution. This might be as simple as a scan whose input is an HDFS file or a join between a file in HDFS and a table in PDW. The output in this case flows back to the user or application program that submitted the query
  • (b)  is similar except that the output of the query is materialized as an output file in HDFS, where it might be consumed by either a subsequent PDW query or by a MapReduce job. Polybase, when appropriate,will translate operations on HDFS-resident data into MapReduce jobs and push those jobs to Hadoop for execution in order to minimize the data imported from HDFS into PDW and maximize the use of Hadoop cluster resources. With Hadoop 2.0 we envision supporting a variety of techniques for processing joins that involve HDFS and PDW resident tables, including, for example, the use of semi-join techniques.

pushdown:


  • 和linked servers一样,PolyBase会设法将尽量多的处理工作转移到源数据库。也就是说,当查询Hadoop或Azure blob存储时,会生成恰当的map/reduce操作。这就是所谓的“下推(pushdown)”,开发人员需要了解的下推限制:
    1. 用于数值、日期、时间值的二元比较操作符(<、>、=、!=、<>、>=、<=)
    2. 算术运算符( +、-、*、/、%)
    3. 逻辑运算符(AND、OR)
    4. 一元运算符(NOT、IS NULL、IS NOT NULL)
    5. BETWEEN、NOT、IN和LIKE操作符可能也可以下推。这取决于查询优化器如何将它们改写为一系列使用基本关系运算符的语句
    6. 下推可以通过OPTION (FORCE EXTERNALPUSHDOWN)显式启用,或通过OPTION (DISABLE EXTERNALPUSHDOWN)显式禁用

参考资料:


  • jdk: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
  • 注意:英文版的window2012 OS 不支持安装 sqlserver2016中文版

DW(三):polybase基本理论的更多相关文章

  1. [转] DDD领域驱动设计(三) 之 理论知识收集汇总

    最近一直在学习领域驱动设计(DDD)的理论知识,从网上搜集了一些个人认为比较有价值的东西,贴出来和大家分享一下: 我一直觉得不要盲目相信权威,比如不能一谈起领域驱动设计,就一定认为国外的那个Eric ...

  2. DW(六):polybase访问Azure Blob Storage

    目录: 连接hadoop配置语法 配置hadoop连接 Pushdown配置 Create external tables for Azure blob storage 连接hadoop配置语法: g ...

  3. DW(五):polybase集群安装

    目录: Prerequisites 集群配置规划 polybase install firewall config 集群配置 删除计算节点 install Prerequisites Microsof ...

  4. 【Hive三】Hive理论

    1. Hive基础 1. Hive基础 Hive基本概念 引入原因: Hive是什么 Hive数据管理 四种数据模型 Hive内部表和外部表 Hive数据类型 Hive的优化 Map的优化: Redu ...

  5. 马凯军201771010116《面向对象程序设计(java)》第三周学习总结

    第一部分  理论知识学习与复习部分 1.在第一章里主要对Java中常见的误解这部分进行了细读,也对Java的“白皮书”术语认真的看了一遍,对Java术语有了更深的理解. 2.在第二章中对Java程序的 ...

  6. 杨其菊201771010134《面向对象程序设计(Java)》第三周学习总结

    <面向对象程序设计(Java)>第三周学习总结 第一部分:理论知识 这周课程没有新进度,由于感觉对基础语法的不熟悉,复习了一遍前三章的细碎知识,学到一些之前不知道的原理: 1.计算机高级语 ...

  7. 深入浅出Git(偏向理论)

    目录 一.理论概述 1. 什么是Git 版本控制系统分类 2. GitLab和GitHub是什么 3.Git功能 二.结合具体命令了解其工作 1.环境 2.部署 Git仓库的使用 简单命令解释 Git ...

  8. day38 并发编程(理论)

    目录 一.操作系统发展史 二.多道技术 1 单核实现并发的效果 2 多道技术图解 3 多道技术重点 三.进程理论 1 必备知识点 2 进程调度 3 进程的三状态 4 两对重要概念 四.开启进程的两种方 ...

  9. redis教程(整理中)

    一.redis简介 1.Redis:键值对类型的内存数据库:应用于高并发和实时请求的场景: 2.Redis常用数据类型: (1) string(基本数据类型)     (2)hash 注:hash中的 ...

随机推荐

  1. MRDS学习四——自动型机器车

    由自己的所在开始,探索自己周围的简单机器车,假设车子的行走路径如下: 我们要把L型路径写成一个Activity,然后由外部输入这个L的大小,最后这个Activity要能够在完成行走路径时吐出更大的L大 ...

  2. C#屏幕截图

    今天通过C#来实现一个简单的屏幕截图功能.实现思路,获取鼠标按下去的位置和鼠标左键释放的位置,计算这个区域的宽度和高度.然后通过 Graphics.CopyFromScreen 方法便可以获取到屏幕截 ...

  3. Oracle 11g 数据库自动备份执行脚本

    @echo offsetlocal enabledelayedexpansiontitle %date% %time:~,8% by LiaoNing Sunray Software Technolo ...

  4. ecmall widgets 挂件开发详解

    Ecmall挂件开发 实质上是后台开发很多页面,分别去调用程序展示这些页面,达到首页内容更换很快的目的,这样做减少后续开发,开发人员只需开发挂件就可以了,至于位置可随意定.(还需调整html,但是起码 ...

  5. Java并发——ReentrantLock类源码阅读

    ReentrantLock内部由Sync类实例实现. Sync类定义于ReentrantLock内部. Sync继承于AbstractQueuedSynchronizer. AbstractQueue ...

  6. 抓取锁的sql语句-第六次修改

    增加异常处理 CREATE OR REPLACE PROCEDURE SOLVE_LOCK AS V_SQL VARCHAR2(3000); --定义 v_sql 接受抓取锁的sql语句V_SQL02 ...

  7. LightOJ 1234 Harmonic Number 调和级数部分和

    题目链接:http://lightoj.com/volume_showproblem.php?problem=1234 Sample Input Sample Output Case : Case : ...

  8. mysql使用use db出现夯住问题

    表的数目在15585个,在使用use db的时候出现夯住 从show processlist中看到一堆表在做排序,想看看这些表的表结构.使用use db之后夯住,没有办法查看. 当时没有想到怎么办,鉴 ...

  9. 关于Spring的69个面试题

    这篇文章总结了一些关于Spring框架的重要问题,这些问题都是你在面试或笔试过程中可能会被问到的.下次你再也不用担心你的面试了,Java Code Geeks这就帮你解答. 大多数你可能被问到的问题都 ...

  10. 剑指offer(11)

    题目: 输入一个链表,输出该链表中倒数第k个结点. 思路: 我们一先想到的应该是循环两次链表,第一次获得它的长度,然后用长度-k,得出目标节点在链表的第几位,再循环一次. 如果要求只用一次循环的话,我 ...