Your SlideShare is downloading. ×
Introduction to Apache Drill - interactive query and analysis at scale
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Introduction to Apache Drill - interactive query and analysis at scale


Published on

Published in: Technology
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide
  • Hive: compile to MR, Aster: external tables in MPP, Oracle/MySQL: export MR results to RDBMSDrill, Impala, CitusDB: real-time
  • Suppose a marketing analyst trying to experiment with ways to do targeting of user segments for next campaign. Needs access to web logs stored in Hadoop, and also needs to access user profiles stored in MongoDB as well as access to transaction data stored in a conventional database.
  • Re ad-hoc:You might not know ahead of time what queries you will want to make. You may need to react to changing circumstances.
  • Two innovations: handle nested-data column style (column-striped representation) and query push-down
  • Source query is parsed and transformed to produce the logical planTypically, the logical plan lives in memory in the form of Java objects, but it also has a textual form. The logical query is then transformed and optimized into the physical plan.The physical plan represents the actual structure of computation as it is done by the system. One of the most important things the optimizer does is the introduction of parallel computation (other: columnar data to improve processing speed)
  • Transcript

    • 1. Introduction to Apache Drill –interactive query and analysis at scale Michael Hausenblas, MapR EMEA 2013-02-22, HUG Munich
    • 2. About Michael• Background in large-scale data integration• Chief Data Engineer EMEA, MapR• Apache Drill contributor
    • 3. Workloads• Batch processing (MapReduce)• Light-weight OLTP (HBase, Cassandra)• Stream processing (Storm, S4)• Search (Solr, Elasticsearch)• Interactive analysis
    • 4. Interactive Query at scale Impala low-latency
    • 5. Use Case• Jane, a marketing analyst• Determine target segments• Data from different sources
    • 6. Today’s Solutions• RDBMS-focused – ETL data from MongoDB/Hadoop – Query with SQL• MapReduce-focused – ETL from RDBMS/MongoDB – Use Hive
    • 7. Requirements• Support for different data sources• Support for different query interfaces• Low-latency/real-time• Ad-hoc queries• Scalable and fast• Reliable
    • 8. Google’s Dremel
    • 9. Apache Drill Overview• Inspired by Google Dremel• Standard SQL2003 support• …. other QL (DSL, etc.) possible• Plug-able data sources• Support for nested data (JSON, etc.)• Schema is optional• Community driven, open, 100’s involved
    • 10. Apache Drill Overview
    • 11. High-level Architecture
    • 12. How does it work? • Drillbits per node, maximize data locality • Co-ordination, query planning, optimization, scheduling, execution are distributedSource Logical PhysicalQuery Parser Plan Optimizer Plan ExecutionSQL 2003, query: [ { topology Scanner API @id: "log",DrQL, op: "sequence", do: [ {MongoQL, op: "scan", source: “logs"}DSL { op: "filter", condition: "x > 3"}, …
    • 13. How does it work?
    • 14. Key Features• Full SQL• Nested data• Optional schema• Extensibility points
    • 15. Full SQL – ANSI SQL2003• SQL-like is often not enough• Integration with existing tools – Tableau, Excel, SAP Crystal Reports – Use standard ODBC/JDBC driver
    • 16. Nested Data• Nested data becoming prevalent – JSON/BSON, XML, ProtoBuf, Avro – Some data sources support it natively (MongoDB, etc.) – Innovation through Dremel• Flattening nested data is error-prone• Apache Drill supports nested data, extension to ANSI SQL2003
    • 17. Optional Schema• Many data sources don’t have rigid schemas – Schema changes rapidly – Different schema per record (e.g. HBase)• Apache Drill supports queries against unknown schema• user can define schema or via discovery
    • 18. Extensibility Points • Query language (parser) - UDFs • Data sources/formats (scanner) • Optimizer • Custom operators (logical plan)Source Logical PhysicalQuery Parser Plan Optimizer Plan Execution
    • 19. Demo{ "id": "0001", "type": "donut", "name": "Cake", "batters": { { "batter”: "sales" : 700.0, [ "typeCount" : 1, { "id": "1001", "type": "Regular" }, "quantity" : 700, { "id": "1002", "type": "Chocolate" }, "ppu" : 1.0… } { "sales" : 109.71,data source: donuts.json "typeCount" : 2, "quantity" : 159, query:[ { "ppu" : 0.69 op:"sequence", } do:[ { { "sales" : 184.25, op: "scan", "typeCount" : 2, ref: "donuts", "quantity" : 335, source: "local-logs", "ppu" : 0.55 selection: {data: "activity"} } }, { result: out.json op: "filter", expr: "donuts.ppu < 2.00" },…logical plan: simple_plan.json
    • 20. Status• Heavy development by multiple orgs• Logical plan, reference interpreter available• SQL interpreter, storage engine implementations (Accumolo, Cassandra, Hbase, etc.) are WIP• Schedule: – Prototype Q1 – Alpha Q2
    • 21. Why do we do it?
    • 22. Engage!• Follow @ApacheDrill on Twitter• Sign up at mailing lists (user|dev)• Keep an eye on• Ping me: