apache drill что это
Apache Drill
Schema-free SQL Query Engine
for Hadoop, NoSQL and
Cloud Storage
Agility
Get faster insights without the overhead (data loading, schema creation and maintenance, transformations, etc.)
Flexibility
Analyze the multi-structured and nested data in non-relational datastores directly without transforming or restricting the data
Familiarity
Leverage your existing SQL skillsets and BI tools including Tableau, Qlikview, MicroStrategy, Spotfire, Excel and more
Query any non-relational datastore (well, almost. )
Drill supports a variety of NoSQL databases and file systems, including HBase, MongoDB, MapR-DB, HDFS, MapR-FS, Amazon S3, Azure Blob Storage, Google Cloud Storage, Swift, NAS and local files. A single query can join data from multiple datastores. For example, you can join a user profile collection in MongoDB with a directory of event logs in Hadoop.
Drill’s datastore-aware optimizer automatically restructures a query plan to leverage the datastore’s internal processing capabilities. In addition, Drill supports data locality, so it’s a good idea to co-locate Drill and the datastore on the same nodes.
Kiss the overhead goodbye and enjoy data agility
Traditional query engines demand significant IT intervention before data can be queried. Drill gets rid of all that overhead so that users can just query the raw data in-situ. There’s no need to load the data, create and maintain schemas, or transform the data before it can be processed. Instead, simply include the path to a Hadoop directory, MongoDB collection or S3 bucket in the SQL query.
Drill leverages advanced query compilation and re-compilation techniques to maximize performance without requiring up-front schema knowledge.
Treat your data like a table even when it’s not
Drill features a JSON data model that enables queries on complex/nested data as well as rapidly evolving structures commonly seen in modern applications and non-relational datastores. Drill also provides intuitive extensions to SQL so that you can easily query complex data.
Drill is the only columnar query engine that supports complex data. It features an in-memory shredded columnar representation for complex data which allows Drill to achieve columnar speed with the flexibility of an internal JSON document model.
Keep using the BI tools you love
Drill supports standard SQL. Business users, analysts and data scientists can use standard BI/analytics tools such as Tableau, Qlik, MicroStrategy, Spotfire, SAS and Excel to interact with non-relational datastores by leveraging Drill’s JDBC and ODBC drivers. Developers can leverage Drill’s simple REST API in their custom applications to create beautiful visualizations.
Drill’s virtual datasets allow even the most complex, non-relational data to be mapped into BI-friendly structures which users can explore and visualize using their tool of choice.
Scale from one laptop to 1000s of servers
We made it easy to download and run Drill on your laptop. It runs on Mac, Windows and Linux, and within a minute or two you’ll be exploring your data. When you’re ready for prime time, deploy Drill on a cluster of commodity servers and take advantage of the world’s most scalable and high performance execution engine.
Drill’s symmetrical architecture (all nodes are the same) and simple installation make it easy to deploy and operate very large clusters.
No more waiting for coffee
Copyright В© 2012-2020 The Apache Software Foundation, licensed under the Apache License, Version 2.0.
Apache and the Apache feather logo are trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.
Национальная библиотека им. Н. Э. Баумана
Bauman National Library
Персональные инструменты
Apache Drill
Разработчики: | Apache Software Foundation |
---|---|
Выпущена: | 19 May 2015 ( 2015-05-19 ) |
Постоянный выпуск: | 1.14 / 5 August 2018 ( 2018-08-05 ) |
Состояние разработки: | Активно |
Написана на: | Java |
Операционная система: | Кросс-платформенное программное обеспечение |
Размер дистрибутива: | 324MB |
Локализация: | Английский |
Тип ПО: | Open-source software |
Лицензия: | Apache License |
Веб-сайт | Apache Drill |
Содержание
Особенности Apache Drill
Архитектура
Динамическое распознавание схемы
Не требует спецификации схемы или типа данных, чтобы запустить процесс выполнения запроса. Drill начинает обработку данных в процессе записи и определяет схему во время обработки. Само описательные форматы данных, такие как базы данных Parquet, JSON, AVRO и NoSQL, имеют схему, указанную как часть самих данных, которые динамически используются во время запроса. Поскольку схема может меняться в ходе запроса, многие операторы предназначены для перенастройки при изменении схем.
Гибкая модель данных
Позволяет получить доступ к вложенным атрибутам данных, как если бы они были столбцами SQL, и предоставляет интуитивно понятные расширения, что упрощает работу с ними. С архитектурной точки зрения Drill предоставляет собой гибкую иерархическую модель столбчатых данных, которая может представлять собой сложные, динамично развивающиеся и изменяющиеся модели данных. Реляционные данные в Drill рассматриваются как особый или упрощенный случай сложных данных.
Не централизованные метаданные
Не имеет единого требования к метаданным. Они выводятся через плагины, соответствующие источникам данных. Плагины хранилищ предоставляют множество метаданных, начиная от полных метаданных (Hive), частичных метаданных (HBase) или центральных метаданных (файлов). Децентрализованные метаданные не привязаны к одному репозиторию Hive, можно запросить несколько репозиториев сразу, а затем объединить данные с информацией из таблиц HBase или с файлом в распределенной файловой системе. Также можно использовать SQL DDL-инструкции для создания метаданных, которые организованы так же, как и традиционная база данных.
Расширяемость
Drill предоставляет расширяемую архитектуру на всех уровнях, включая плагин хранения, запросы, оптимизацию/выполнение запросов и уровни API-клиента. Можно настроить любой уровень для конкретных потребностей организации, или расширить этот слой на более широкий набор спектр использования. Использует сканирование классов для поиска и загрузки плагинов и добавления дополнительных модулей, функций и операторов хранения с минимальной конфигурацией.
Запросы Drill
Следующая схема (рисунок 1) представляет собой связь между клиентами, приложениями и Drillbits:
Рисунок 1 – схема взаимодействия
Основные фрагменты
Второстепенные фрагменты
Исполнение второстепенных фрагментов
Второстепенные фрагменты могут выполняться как корневые, промежуточные или фрагменты листьев. Структура представлена на рисунке 2. Дерево выполнения содержит только один корневой фрагмент. Узлы пронумерованы от корня, причем индекс корня равен нулю. Данные перетекают от листовых фрагментов к корневому фрагменту. Корневой фрагмент запускается в Foreman и получает входящие запросы, считывает метаданные из таблиц, перезаписывает запросы и направляет их на следующий уровень в дереве. Промежуточные фрагменты начинают исполняться, когда данные доступны или подаются к ним из других фрагментов. Они выполняют операции над данными, а затем отправляют данные вниз по иерархии. Они также передают агрегированные результаты корневому фрагменту, который выполняет дополнительную агрегацию и предоставляет результаты запроса клиенту или приложению. Листовые фрагменты параллельно сканируют таблицы фрагментов и связываются со слоем памяти или получают доступ к данным на локальном диске.
Рисунок 2 – дерево исполнения второстепенных фрагментов
Быстрый старт
Информация для установки
Допустимые операционные системы: Linux, Microsoft Windows или Mac OX. Для установки централизованной системы запросов, необходимы следующие требования:
Архив уже содержит JSON/Parquet запросы, которые можно выполнить сразу же после установки. После установки запустите командную строку Drill, которая представляет собой консольную утилиту на Java для подключения к реляционным БД и создания SQL-запросов. Использует SQL:2011 с расширениями для иерархической структуры данных и других возможностей.
Требования для установки:
Linux, Windows или Mac OX: Oracle JDK version 8 Только для Windows :
Проверка версии Java
Необходимо убедиться, что используется Java с версией не ниже восьмой. При помощи командной строки это можно сделать следующим образом:
Установка и запуск на Linux/Mac
Распаковка запустит установку. Теперь можно запускать!
Для встроенного режима используйте drill-embedded команду:
Далее можно выполнять запросы.
Установка и запуск на Windows
Для установки Drill на Windows необходимо:
Пример пробного запуска приведен на рисунке 3.
Рисунок 3 – пример запуска Drill на Windows
Drill Introduction
Drill is an Apache open-source SQL query engine for Big Data exploration. Drill is designed from the ground up to support high-performance analysis on the semi-structured and rapidly evolving data coming from modern Big Data applications, while still providing the familiarity and ecosystem of ANSI SQL, the industry-standard query language. Drill provides plug-and-play integration with existing Apache Hive and Apache HBase deployments.
Apache Drill Key Features
Key features of Apache Drill are:
Quick Links
If you’ve never used Drill, visit these links to get a jump start:
What’s New in Apache Drill 1.19
What’s New in Apache Drill 1.18
What’s New in Apache Drill 1.17
Hive complex types support:
New format plugins support:
What’s New in Apache Drill 1.16
What’s New in Apache Drill 1.15
What’s New in Apache Drill 1.14
What’s New in Apache Drill 1.13
What’s New in Apache Drill 1.12
Drill 1.12 provides the following new features and improvements:
What’s New in Apache Drill 1.11
Drill 1.11 provides the following new features and improvements:
What’s New in Apache Drill 1.10
Drill 1.10 provides the following new features and improvements:
What’s New in Apache Drill 1.9
Drill 1.9 provides the following new features:
What’s New in Apache Drill 1.8
Drill 1.8 provides the following new features and changes:
What’s New in Apache Drill 1.7
Drill 1.7 provides the following new features:
What’s New in Apache Drill 1.6
Drill 1.6 provides the following new features:
What’s New in Apache Drill 1.5
Drill 1.5 provides the following new features:
What’s New in Apache Drill 1.4
Drill 1.4 introduces the following improvements:
Drill 1.4 fixes an error that occurred when you query a Hive table using the HBaseStorageHandler (DRILL-3739). To successfully query a Hive table using the HBaseStorageHandler, you need to configure the Hive storage plugin as described in the Hive storage plugin documentation.
What’s New in Apache Drill 1.3
This releases fix issues and add a number of enhancements, including the following ones:
What’s New in Apache Drill 1.2
This release of Drill fixes many issues and introduces a number of enhancements, including the following ones:
What’s New in Apache Drill 1.1
Many enhancements in Apache Drill 1.1 include the following key features:
What’s New in Apache Drill 1.0
Apache Drill 1.0 offers the following new features:
In this release, Drill disables the DECIMAL data type, including casting to DECIMAL and reading DECIMAL types from Parquet and Hive. You can enable the DECIMAL type, but this is not recommended.
Copyright В© 2012-2020 The Apache Software Foundation, licensed under the Apache License, Version 2.0.
Apache and the Apache feather logo are trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.
SQL-запрос для данных смешанной схемы с использованием Apache Drill
Возможно, вы слышали это заявление раньше:
Apache Drill обнаруживает схемы на лету.
Что это значит, и почему это должно иметь значение для вас?
Возможности SQL для бизнес-аналитики само собой разумеющиеся, но проблема в настройках больших данных состоит в том, что SQL обычно является статическим языком, который предполагает заранее определенную, фиксированную и хорошо известную схему. SQL также нужны плоские структуры данных. Предполагалось, что вам нужна фиксированная схема для производительности. Напротив, работа в области больших данных требует гибкости и динамичности. Вы столкнетесь с широким спектром типов данных, включая неструктурированные и полуструктурированные данные, а также вложенные JSON и Parquet; эти форматы данных не подходят для традиционных подходов.
Усилия, необходимые для преобразования этих классов данных с целью запроса их с помощью SQL в традиционных базах данных (моделирование данных AKA), часто ставят эти источники данных за пределы в прагматическом смысле. Вот тут-то и появился инновационный дизайн Apache Drill с открытым исходным кодом. Используя стандартный синтаксис ANSI SQL, Drill легко и без большого количества дорогостоящей обработки ETL обрабатывает широкий спектр источников и форматов больших данных. Drill исследует и запрашивает данные как они есть, с существующими типами данных, взаимодействуя с использованием модели данных JSON.
В своем выступлении под названием «Оптимизация точно в срок» на конференции Strata + Hadoop World в Сан-Хосе Тед Даннинг, главный разработчик приложений в MapR, рассказал об этой проблеме и о том, как Drill решает ее. Тед пояснил, что Drill «переносит большую часть оптимизации и специфики типов из процессов анализа запросов и статической оптимизации в сам процесс выполнения» и делает это без необходимости заранее много знать о схеме. Кроме того, Drill может оптимизировать запросы к наборам данных с изменением схемы. Обработка данных с несколькими схемами важна для больших данных, потому что даже если данные начинаются с четко определенной схемы в первый день, обычно это происходит незадолго до изменения этой схемы. Результатом являются данные, которые не могут быть обработаны напрямую традиционными механизмами SQL. Тед подчеркнул эту мысль, сказав: «Drill объединяет сложность и знакомство с SQL с гибкостью экосистемы Hadoop».
Пример: SQL-запрос Apache Drill для данных смешанной схемы
Эта способность Drill обнаруживать метаданные схемы на лету имеет практические преимущества. Предположим, в розничной ситуации у вас есть таблица, в которой новая колонка для нового производства была добавлена шесть месяцев назад. Вы хотели бы запросить более старые данные (без столбца) и более новые данные (со столбцом), используя один запрос. Drill может сделать это, потому что мутация схемы является основной особенностью.
Я спросил системного инженера Криса Матту о его опыте работы с клиентами MapR, которые используют Drill для решения аналогичных проблем. Он ответил: «Конечно, это происходит постоянно. Когда Drill перебирает новое поле, с которым он не сталкивался прежде, он включает его во все результаты, устанавливая для полей из данных без этого столбца значение NULL. Это то, что делает Drill таким мощным в реальном использовании и позволяет избежать необходимости поддерживать схему и использовать ETL для подгонки данных ». Далее Крис объяснил, что Drill работает со всеми подключаемыми плагинами хранения (и через них, если вы присоединяетесь).
Это заставило меня подумать, что было бы весело и полезно показать, как вы будете запрашивать два набора данных с разной схемой.
В одном вы знаете имя, компанию и должность человека. Позже вы узнаете, что некоторые из этих людей имеют секретную личность супергероя, поэтому вы добавляете столбец с этим идентификатором для добавляемых новых дел. При традиционных подходах к этим смешанным данным схемы будет трудно обращаться. Но с помощью Drill вы просто указываете свой запрос на старые и новые данные и отправляетесь.
Обратите внимание, что происходит в этих трех ситуациях:
Вот как это выглядит (спасибо Теду Даннингу и Крису Матте за помощь с примером):
Drill in 10 Minutes
Objective
Use Apache Drill to query sample data in 10 minutes. For simplicity, you run Drill in embedded mode rather than distributed mode to try out Drill without having to perform any setup tasks.
Installation Overview
You can install Drill to run in embedded mode on a machine running Linux, Mac OS X, or Windows. For information about installing Drill to run in distributed mode, see Installing Drill in Distributed Mode.
This installation procedure includes how to download the Apache Drill archive file and extract the contents to a directory on your machine. The Apache Drill archive contains sample JSON and Parquet files that you can query immediately.
After installing Drill, you start the Drill shell. The Drill shell is a pure-Java console-based utility for connecting to relational databases and executing SQL commands. Drill follows the SQL:2011 standard with extensions for nested data formats and other capabilities.
Embedded Mode Installation Prerequisites
Your machine must meet the following prerequisites to run Drill in embedded mode:
Java Installation Prerequisite Check
Run the following command in a terminal (Linux and Mac OS X) or Command Prompt (Windows) to verify that Java 8 is the version in effect:
The output looks something like this:
Installing Drill on Linux or Mac OS X
Complete the following steps to install Drill:
The extraction process creates an installation directory containing the Drill software.
You can start Drill.
Starting Drill on Linux and Mac OS X
Start Drill in embedded mode using the drill-embedded command:
Navigate to the Drill installation directory. For example:
Issue the following command to launch Drill in embedded mode:
The message of the day followed by the 0: jdbc:drill:zk=local> prompt appears.
At this point, you can submit queries to Drill.
Installing and Starting Drill on Windows
Stopping Drill
Issue the following command to exit the Drill shell:
Query Sample Data
The Drill installation includes a sample-data directory with JSON and Parquet files that you can query. The default dfs storage plugin configuration represents the local file system on your machine when you install Drill in embedded mode. For more information about storage plugin configuration, refer to Storage Plugin Registration.
Use SQL to query the sample JSON and Parquet files in the sample-data directory on your local file system.
Querying a JSON File
Querying Parquet Files
Query the region.parquet and nation.parquet files in the sample-data directory on your local file system.
Region File
If you followed the Apache Drill in 10 Minutes instructions to install Drill in embedded mode, the path to the parquet file varies between operating systems.
To view the data in the region.parquet file, use the actual path to your Drill installation to construct this query:
Nation File
The path to the parquet file varies between operating systems. Use the actual path to your Drill installation to construct this query:
Summary
Apache Drill supports nested data, schema-less execution, and decentralized metadata. You can now use Drill to run simple queries on JSON or Parquet data.
Next Steps
Now that you have an idea about what Drill can do, you might want to:
More Information
For more information about Apache Drill, explore the Apache Drill web site.
Copyright В© 2012-2020 The Apache Software Foundation, licensed under the Apache License, Version 2.0.
Apache and the Apache feather logo are trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.