BT

InfoQ Homepage News Combine SQL Server with Hadoop Using PolyBase

Combine SQL Server with Hadoop Using PolyBase

Bookmarks

With the recently released SQL Server 2016, you can now use SQL queries against Hadoop and Azure blob storage. The technology, known as PolyBase, was previously available in SQL Server Parallel Data Warehouse.

As with linked servers, PolyBase attempts to offload as much of the processing as it can onto the source database. Then means that when executing a query against Hadoop or Azure blob storage, it will generate the appropriate map/reduce operations. This is known as a “pushdown” and it has limitations that the developer needs to be aware of:

SQL Server allows the following basic expressions and operators for predicate pushdown.

  • Binary comparison operators ( <, >, =, !=, <>, >=, <= ) for numeric, date, and time values.
  • Arithmetic operators ( +, -, *, /, % ).
  • Logical operators (AND, OR).
  • Unary operators (NOT, IS NULL, IS NOT NULL).

The documentation goes on to say that,

The operators BETWEEN, NOT, IN, and LIKE might be pushed-down. This depends on how the query optimizer rewrites them as a series of statements that use basic relational operators.

Pushdowns can be explicitly forced or disabled using OPTION (FORCE EXTERNALPUSHDOWN) and OPTION (DISABLE EXTERNALPUSHDOWN) respectively.

Combining Relational and Non-Relational Data

Since PolyBase is based on normal T-SQL, developers have access to the usual operations such as joins. This means you can execute a map-reduce operation against a Hadoop cluster, and then join the results to tables in your SQL Server database in a single query.

Import/Export

Moving data between SQL Server, Hadoop, and Azure blob storage no longer requires external ETL processes or tools. Instead, you use the same INSERT INTO/SELECT FROM syntax that you would use between any two normal tables. From a developer perspective, Hadoop and Azure blob storage are just two more table types to choose from when provisioning a database. (From an operations standpoint, you still need to manage security and backups separately.)

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Broken link

    by Roberto Pepato /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    The link on "As with linked servers..." is broken

  • Re: Broken link

    by Charles Humble /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Thanks for letting us know. Fixed.

    Charles Humble
    Head of editorial, InfoQ.com

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.