You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by ts...@apache.org on 2015/01/15 06:11:48 UTC

svn commit: r1651949 [10/13] - in /drill/site/trunk/content/drill: ./ blog/2014/11/19/sql-on-mongodb/ blog/2014/12/02/drill-top-level-project/ blog/2014/12/09/running-sql-queries-on-amazon-s3/ blog/2014/12/11/apache-drill-qa-panelist-spotlight/ blog/20...

Added: drill/site/trunk/content/drill/docs/querying-a-file-system/index.html
URL: http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/querying-a-file-system/index.html?rev=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/querying-a-file-system/index.html (added)
+++ drill/site/trunk/content/drill/docs/querying-a-file-system/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,139 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>Querying a File System - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>Querying a File System</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>Files and directories are like standard SQL tables to Drill. You can specify a
+file system &quot;database&quot; as a prefix in queries when you refer to objects across
+databases. In Drill, a file system database consists of a storage plugin name
+followed by an optional workspace name, for example <storage
+plugin>.<workspace> or hdfs.logs.</p>
+
+<p>The following example shows a query on a file system database in a Hadoop
+distributed file system:</p>
+
+<p><code>SELECT * FROM hdfs.logs.`AppServerLogs/20104/Jan/01/part0001.txt`;</code></p>
+
+<p>The default <code>dfs</code> storage plugin instance registered with Drill has a
+<code>default</code> workspace. If you query data in the <code>default</code> workspace, you do not
+need to include the workspace in the query. Refer to
+<a href="https://cwiki.apache.org/confluence/display/DRILL/Workspaces">Workspaces</a> for
+more information.</p>
+
+<p>Drill supports the following file types:</p>
+
+<ul>
+<li>Plain text files, including:
+
+<ul>
+<li>Comma-separated values (CSV, type: text)</li>
+<li>Tab-separated values (TSV, type: text)</li>
+<li>Pipe-separated values (PSV, type: text)</li>
+</ul></li>
+<li>Structured data files:
+
+<ul>
+<li>JSON (type: json)</li>
+<li>Parquet (type: parquet)</li>
+</ul></li>
+</ul>
+
+<p>The extensions for these file types must match the configuration settings for
+your registered storage plugins. For example, PSV files may be defined with a
+<code>.tbl</code> extension, while CSV files are defined with a <code>.csv</code> extension.</p>
+
+<p>Click on any of the following links for more information about querying
+various file types:</p>
+
+<ul>
+<li><a href="/confluence/display/DRILL/Querying+JSON+Files">Querying JSON Files</a></li>
+<li><a href="/confluence/display/DRILL/Querying+Parquet+Files">Querying Parquet Files</a></li>
+<li><a href="/confluence/display/DRILL/Querying+Plain+Text+Files">Querying Plain Text Files</a></li>
+<li><a href="/confluence/display/DRILL/Querying+Directories">Querying Directories</a></li>
+</ul>
+</div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+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.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>

Added: drill/site/trunk/content/drill/docs/querying-complex-data/index.html
URL: http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/querying-complex-data/index.html?rev=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/querying-complex-data/index.html (added)
+++ drill/site/trunk/content/drill/docs/querying-complex-data/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,155 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>Querying Complex Data - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>Querying Complex Data</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>Apache Drill queries do not require prior knowledge of the actual data you are
+trying to access, regardless of its source system or its schema and data
+types. The sweet spot for Apache Drill is a SQL query workload against
+&quot;complex data&quot;: data made up of various types of records and fields, rather
+than data in a recognizable relational form (discrete rows and columns). Drill
+is capable of discovering the form of the data when you submit the query.
+Nested data formats such as JSON (JavaScript Object Notation) files and
+Parquet files are not only <em>accessible</em>: Drill provides special operators and
+functions that you can use to _drill down _into these files and ask
+interesting analytic questions.</p>
+
+<p>These operators and functions include:</p>
+
+<ul>
+<li>References to nested data values</li>
+<li>Access to repeating values in arrays and arrays within arrays (array indexes)</li>
+</ul>
+
+<p>The SQL query developer needs to know the data well enough to write queries
+that identify values of interest in the target file. For example, the writer
+needs to know what a record consists of, and its data types, in order to
+reliably request the right &quot;columns&quot; in the select list. Although these data
+values do not manifest themselves as columns in the source file, Drill will
+return them in the result set as if they had the predictable form of columns
+in a table. Drill also optimizes queries by treating the data as &quot;columnar&quot;
+rather than reading and analyzing complete records. (Drill uses similar
+parallel execution and optimization capabilities to commercial columnar MPP
+databases.)</p>
+
+<p>Given a basic knowledge of the input file, the developer needs to know how to
+use the SQL extensions that Drill provides and how to use them to &quot;reach into&quot;
+the nested data. The following examples show how to write both simple queries
+against JSON files and interesting queries that unpack the nested data. The
+examples show how to use the Drill extensions in the context of standard SQL
+SELECT statements. For the most part, the extensions use standard JavaScript
+notation for referencing data elements in a hierarchy.</p>
+
+<h3 id="before-you-begin">Before You Begin</h3>
+
+<p>The examples in this section operate on JSON data files. In order to write
+your own queries, you need to be aware of the basic data types in these files:</p>
+
+<ul>
+<li>string (all data inside double quotes), such as <code>&quot;0001&quot;</code> or <code>&quot;Cake&quot;</code></li>
+<li>numeric types: integers, decimals, and floats, such as <code>0.55</code> or <code>10</code></li>
+<li>null values</li>
+<li>boolean values: true, false</li>
+</ul>
+
+<p>Check that you have the following configuration setting for JSON files in the
+Drill Web UI (<code>dfs</code> storage plugin configuration):</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">&quot;json&quot; : {
+  &quot;type&quot; : &quot;json&quot;
+}
+</code></pre></div>
+<p>Click on any of the following links to see examples of complex queries:</p>
+
+<ul>
+<li><a href="/confluence/display/DRILL/Sample+Data%3A+Donuts">Sample Data: Donuts</a></li>
+<li><a href="/confluence/display/DRILL/Query+1%3A+Selecting+Flat+Data">Query 1: Selecting Flat Data</a></li>
+<li><a href="/confluence/display/DRILL/Query+2%3A+Using+Standard+SQL+Functions%2C+Clauses%2C+and+Joins">Query 2: Using Standard SQL Functions, Clauses, and Joins</a></li>
+<li><a href="/confluence/display/DRILL/Query+3%3A+Selecting+Nested+Data+for+a+Column">Query 3: Selecting Nested Data for a Column</a></li>
+<li><a href="/confluence/display/DRILL/Query+4%3A+Selecting+Multiple+Columns+Within+Nested+Data">Query 4: Selecting Multiple Columns Within Nested Data</a></li>
+</ul>
+</div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+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.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>

Added: drill/site/trunk/content/drill/docs/querying-directories/index.html
URL: http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/querying-directories/index.html?rev=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/querying-directories/index.html (added)
+++ drill/site/trunk/content/drill/docs/querying-directories/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,173 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>Querying Directories - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>Querying Directories</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>You can store multiple files in a directory and query them as if they were a
+single entity. You do not have to explicitly join the files. The files must be
+compatible, in the sense that they must have comparable data types and columns
+in the same order. This type of query is not limited to text files; you can
+also query directories of JSON files, for example.</p>
+
+<p>For example, assume that a <code>testdata</code> directory contains two files with the
+same structure: <code>plays.csv</code> and <code>moreplays.csv</code>. The first file contains 7
+records and the second file contains 3 records. The following query returns
+the &quot;union&quot; of the two files, ordered by the first column:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">0: jdbc:drill:zk=local&gt; select columns[0] as `Year`, columns[1] as Play 
+from dfs.`/Users/brumsby/drill/testdata` order by 1;
+
++------------+------------+
+|    Year    |    Play    |
++------------+------------+
+| 1594       | Comedy of Errors |
+| 1595       | Romeo and Juliet |
+| 1596       | The Merchant of Venice |
+| 1599       | As You Like It |
+| 1599       | Hamlet     |
+| 1601       | Twelfth Night |
+| 1606       | Macbeth    |
+| 1606       | King Lear  |
+| 1609       | The Winter&#39;s Tale |
+| 1610       | The Tempest |
++------------+------------+
+10 rows selected (0.296 seconds)
+</code></pre></div>
+<p>You can drill down further and automatically query subdirectories as well. For
+example, assume that you have a logs directory that contains a subdirectory
+for each year and subdirectories for each month (1 through 12). The month
+directories contain JSON files.</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">[root@ip-172-16-1-200 logs]# pwd
+/mapr/drilldemo/labs/clicks/logs
+[root@ip-172-16-1-200 logs]# ls
+2012  2013  2014
+[root@ip-172-16-1-200 logs]# cd 2013
+[root@ip-172-16-1-200 2013]# ls
+1  10  11  12  2  3  4  5  6  7  8  9
+</code></pre></div>
+<p>You can query all of these files, or a subset, by referencing the file system
+once in a Drill query. For example, the following query counts the number of
+records in all of the files inside the <code>2013</code> directory:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">0: jdbc:drill:&gt; select count(*) from MFS.`/mapr/drilldemo/labs/clicks/logs/2013` ;
++------------+
+|   EXPR$0   |
++------------+
+| 24000      |
++------------+
+1 row selected (2.607 seconds)
+</code></pre></div>
+<p>You can also use variables <code>dir0</code>, <code>dir1</code>, and so on, to refer to
+subdirectories in your workspace path. For example, assume that <code>bob.logdata</code>
+is a workspace that points to the <code>logs</code> directory, which contains multiple
+subdirectories: <code>2012</code>, <code>2013</code>, and <code>2014</code>. The following query constrains
+files inside the subdirectory named <code>2013</code>. The variable <code>dir0</code> refers to the
+first level down from logs, <code>dir1</code> to the next level, and so on.</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">0: jdbc:drill:&gt; use bob.logdata;
++------------+------------+
+|     ok     |  summary   |
++------------+------------+
+| true       | Default schema changed to &#39;bob.logdata&#39; |
++------------+------------+
+1 row selected (0.305 seconds)
+
+0: jdbc:drill:&gt; select * from logs where dir0=&#39;2013&#39; limit 10;
++------------+------------+------------+------------+------------+------------+------------+------------+------------+-------------+
+|    dir0    |    dir1    |  trans_id  |    date    |    time    |  cust_id   |   device   |   state    |  camp_id   |  keywords   |
++------------+------------+------------+------------+------------+------------+------------+------------+------------+-------------+
+| 2013       | 2          | 12115      | 02/23/2013 | 19:48:24   | 3          | IOS5       | az         | 5          | who&#39;s       |
+| 2013       | 2          | 12127      | 02/26/2013 | 19:42:03   | 11459      | IOS5       | wa         | 10         | for         |
+| 2013       | 2          | 12138      | 02/09/2013 | 05:49:01   | 1          | IOS6       | ca         | 7          | minutes     |
+| 2013       | 2          | 12139      | 02/23/2013 | 06:58:20   | 1          | AOS4.4     | ms         | 7          | i           |
+| 2013       | 2          | 12145      | 02/10/2013 | 10:14:56   | 10         | IOS5       | mi         | 6          | wrong       |
+| 2013       | 2          | 12157      | 02/15/2013 | 02:49:22   | 102        | IOS5       | ny         | 5          | want        |
+| 2013       | 2          | 12176      | 02/19/2013 | 08:39:02   | 28         | IOS5       | or         | 0          | and         |
+| 2013       | 2          | 12194      | 02/24/2013 | 08:26:17   | 125445     | IOS5       | ar         | 0          | say         |
+| 2013       | 2          | 12236      | 02/05/2013 | 01:40:05   | 10         | IOS5       | nj         | 2          | sir         |
+| 2013       | 2          | 12249      | 02/03/2013 | 04:45:47   | 21725      | IOS5       | nj         | 5          | no          |
++------------+------------+------------+------------+------------+------------+------------+------------+------------+-------------+
+10 rows selected (0.583 seconds)
+</code></pre></div></div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+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.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>

Added: drill/site/trunk/content/drill/docs/querying-hbase/index.html
URL: http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/querying-hbase/index.html?rev=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/querying-hbase/index.html (added)
+++ drill/site/trunk/content/drill/docs/querying-hbase/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,257 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>Querying HBase - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>Querying HBase</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>This is a simple exercise that provides steps for creating a “students” table
+and a “clicks” table in HBase that you can query with Drill.</p>
+
+<p>To create the HBase tables and query them with Drill, complete the following
+steps:</p>
+
+<ol>
+<li><p>Issue the following command to start the HBase shell:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">hbase shell
+</code></pre></div></li>
+<li><p>Issue the following commands to create a ‘students’ table and a ‘clicks’ table with column families in HBase:  </p>
+
+<p><code>echo &quot;create &#39;students&#39;,&#39;account&#39;,&#39;address&#39;&quot; | hbase shell</code></p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">``echo &quot;create &#39;clicks&#39;,&#39;clickinfo&#39;,&#39;iteminfo&#39;&quot; | hbase shell``
+</code></pre></div></li>
+<li><p>Issue the following command with the provided data to create a <code>testdata.txt</code> file:  </p>
+
+<p><code>cat &gt; testdata.txt</code></p>
+
+<p><strong>Sample Data</strong></p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">put &#39;students&#39;,&#39;student1&#39;,&#39;account:name&#39;,&#39;Alice&#39;
+put &#39;students&#39;,&#39;student1&#39;,&#39;address:street&#39;,&#39;123 Ballmer Av&#39;
+put &#39;students&#39;,&#39;student1&#39;,&#39;address:zipcode&#39;,&#39;12345&#39;
+put &#39;students&#39;,&#39;student1&#39;,&#39;address:state&#39;,&#39;CA&#39;
+put &#39;students&#39;,&#39;student2&#39;,&#39;account:name&#39;,&#39;Bob&#39;
+put &#39;students&#39;,&#39;student2&#39;,&#39;address:street&#39;,&#39;1 Infinite Loop&#39;
+put &#39;students&#39;,&#39;student2&#39;,&#39;address:zipcode&#39;,&#39;12345&#39;
+put &#39;students&#39;,&#39;student2&#39;,&#39;address:state&#39;,&#39;CA&#39;
+put &#39;students&#39;,&#39;student3&#39;,&#39;account:name&#39;,&#39;Frank&#39;
+put &#39;students&#39;,&#39;student3&#39;,&#39;address:street&#39;,&#39;435 Walker Ct&#39;
+put &#39;students&#39;,&#39;student3&#39;,&#39;address:zipcode&#39;,&#39;12345&#39;
+put &#39;students&#39;,&#39;student3&#39;,&#39;address:state&#39;,&#39;CA&#39;
+put &#39;students&#39;,&#39;student4&#39;,&#39;account:name&#39;,&#39;Mary&#39;
+put &#39;students&#39;,&#39;student4&#39;,&#39;address:street&#39;,&#39;56 Southern Pkwy&#39;
+put &#39;students&#39;,&#39;student4&#39;,&#39;address:zipcode&#39;,&#39;12345&#39;
+put &#39;students&#39;,&#39;student4&#39;,&#39;address:state&#39;,&#39;CA&#39;
+put &#39;clicks&#39;,&#39;click1&#39;,&#39;clickinfo:studentid&#39;,&#39;student1&#39;
+put &#39;clicks&#39;,&#39;click1&#39;,&#39;clickinfo:url&#39;,&#39;http://www.google.com&#39;
+put &#39;clicks&#39;,&#39;click1&#39;,&#39;clickinfo:time&#39;,&#39;2014-01-01 12:01:01.0001&#39;
+put &#39;clicks&#39;,&#39;click1&#39;,&#39;iteminfo:itemtype&#39;,&#39;image&#39;
+put &#39;clicks&#39;,&#39;click1&#39;,&#39;iteminfo:quantity&#39;,&#39;1&#39;
+put &#39;clicks&#39;,&#39;click2&#39;,&#39;clickinfo:studentid&#39;,&#39;student1&#39;
+put &#39;clicks&#39;,&#39;click2&#39;,&#39;clickinfo:url&#39;,&#39;http://www.amazon.com&#39;
+put &#39;clicks&#39;,&#39;click2&#39;,&#39;clickinfo:time&#39;,&#39;2014-01-01 01:01:01.0001&#39;
+put &#39;clicks&#39;,&#39;click2&#39;,&#39;iteminfo:itemtype&#39;,&#39;image&#39;
+put &#39;clicks&#39;,&#39;click2&#39;,&#39;iteminfo:quantity&#39;,&#39;1&#39;
+put &#39;clicks&#39;,&#39;click3&#39;,&#39;clickinfo:studentid&#39;,&#39;student2&#39;
+put &#39;clicks&#39;,&#39;click3&#39;,&#39;clickinfo:url&#39;,&#39;http://www.google.com&#39;
+put &#39;clicks&#39;,&#39;click3&#39;,&#39;clickinfo:time&#39;,&#39;2014-01-01 01:02:01.0001&#39;
+put &#39;clicks&#39;,&#39;click3&#39;,&#39;iteminfo:itemtype&#39;,&#39;text&#39;
+put &#39;clicks&#39;,&#39;click3&#39;,&#39;iteminfo:quantity&#39;,&#39;2&#39;
+put &#39;clicks&#39;,&#39;click4&#39;,&#39;clickinfo:studentid&#39;,&#39;student2&#39;
+put &#39;clicks&#39;,&#39;click4&#39;,&#39;clickinfo:url&#39;,&#39;http://www.ask.com&#39;
+put &#39;clicks&#39;,&#39;click4&#39;,&#39;clickinfo:time&#39;,&#39;2013-02-01 12:01:01.0001&#39;
+put &#39;clicks&#39;,&#39;click4&#39;,&#39;iteminfo:itemtype&#39;,&#39;text&#39;
+put &#39;clicks&#39;,&#39;click4&#39;,&#39;iteminfo:quantity&#39;,&#39;5&#39;
+put &#39;clicks&#39;,&#39;click5&#39;,&#39;clickinfo:studentid&#39;,&#39;student2&#39;
+put &#39;clicks&#39;,&#39;click5&#39;,&#39;clickinfo:url&#39;,&#39;http://www.reuters.com&#39;
+put &#39;clicks&#39;,&#39;click5&#39;,&#39;clickinfo:time&#39;,&#39;2013-02-01 12:01:01.0001&#39;
+put &#39;clicks&#39;,&#39;click5&#39;,&#39;iteminfo:itemtype&#39;,&#39;text&#39;
+put &#39;clicks&#39;,&#39;click5&#39;,&#39;iteminfo:quantity&#39;,&#39;100&#39;
+put &#39;clicks&#39;,&#39;click6&#39;,&#39;clickinfo:studentid&#39;,&#39;student3&#39;
+put &#39;clicks&#39;,&#39;click6&#39;,&#39;clickinfo:url&#39;,&#39;http://www.google.com&#39;
+put &#39;clicks&#39;,&#39;click6&#39;,&#39;clickinfo:time&#39;,&#39;2013-02-01 12:01:01.0001&#39;
+put &#39;clicks&#39;,&#39;click6&#39;,&#39;iteminfo:itemtype&#39;,&#39;image&#39;
+put &#39;clicks&#39;,&#39;click6&#39;,&#39;iteminfo:quantity&#39;,&#39;1&#39;
+put &#39;clicks&#39;,&#39;click7&#39;,&#39;clickinfo:studentid&#39;,&#39;student3&#39;
+put &#39;clicks&#39;,&#39;click7&#39;,&#39;clickinfo:url&#39;,&#39;http://www.ask.com&#39;
+put &#39;clicks&#39;,&#39;click7&#39;,&#39;clickinfo:time&#39;,&#39;2013-02-01 12:45:01.0001&#39;
+put &#39;clicks&#39;,&#39;click7&#39;,&#39;iteminfo:itemtype&#39;,&#39;image&#39;
+put &#39;clicks&#39;,&#39;click7&#39;,&#39;iteminfo:quantity&#39;,&#39;10&#39;
+put &#39;clicks&#39;,&#39;click8&#39;,&#39;clickinfo:studentid&#39;,&#39;student4&#39;
+put &#39;clicks&#39;,&#39;click8&#39;,&#39;clickinfo:url&#39;,&#39;http://www.amazon.com&#39;
+put &#39;clicks&#39;,&#39;click8&#39;,&#39;clickinfo:time&#39;,&#39;2013-02-01 22:01:01.0001&#39;
+put &#39;clicks&#39;,&#39;click8&#39;,&#39;iteminfo:itemtype&#39;,&#39;image&#39;
+put &#39;clicks&#39;,&#39;click8&#39;,&#39;iteminfo:quantity&#39;,&#39;1&#39;
+put &#39;clicks&#39;,&#39;click9&#39;,&#39;clickinfo:studentid&#39;,&#39;student4&#39;
+put &#39;clicks&#39;,&#39;click9&#39;,&#39;clickinfo:url&#39;,&#39;http://www.amazon.com&#39;
+put &#39;clicks&#39;,&#39;click9&#39;,&#39;clickinfo:time&#39;,&#39;2013-02-01 22:01:01.0001&#39;
+put &#39;clicks&#39;,&#39;click9&#39;,&#39;iteminfo:itemtype&#39;,&#39;image&#39;
+put &#39;clicks&#39;,&#39;click9&#39;,&#39;iteminfo:quantity&#39;,&#39;10&#39;
+</code></pre></div></li>
+<li><p>Issue the following command to verify that the data is in the <code>testdata.txt</code> file:  </p>
+
+<p><code>cat testdata.txt | hbase shell</code></p></li>
+<li><p>Issue <code>exit</code> to leave the <code>hbase shell</code>.</p></li>
+<li><p>Start Drill. Refer to <a href="/confluence/pages/viewpage.action?pageId=44994063">Starting/Stopping Drill</a> for instructions.</p></li>
+<li><p>Use Drill to issue the following SQL queries on the “students” and “clicks” tables:
+a. Issue the following query to see the data in the “students” table:  </p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">``SELECT * FROM hbase.`students`;``
+
+The query returns binary results:
+
+`Query finished, fetching results ...`
+
+`+----------+----------+----------+-----------+----------+----------+----------+-----------+`
+
+`|id    | name        | state       | street      | zipcode |`
+
+`+----------+----------+----------+-----------+----------+-----------+----------+-----------`
+
+`| [B@1ee37126 | [B@661985a1 | [B@15944165 | [B@385158f4 | [B@3e08d131 |`
+
+`| [B@64a7180e | [B@161c72c2 | [B@25b229e5 | [B@53dc8cb8 |[B@1d11c878 |`
+
+`| [B@349aaf0b | [B@175a1628 | [B@1b64a812 | [B@6d5643ca |[B@147db06f |`
+
+`| [B@3a7cbada | [B@52cf5c35 | [B@2baec60c | [B@5f4c543b |[B@2ec515d6 |`
+</code></pre></div>
+<p>Since Drill does not require metadata, you must use the SQL <code>CAST</code> function in
+some queries to get readable query results.</p>
+
+<p>b. Issue the following query, that includes the <code>CAST</code> function, to see the data in the “<code>students</code>” table:</p>
+
+<p><code>SELECT CAST(students.clickinfo.studentid as VarChar(20)),
+CAST(students.account.name as VarChar(20)), CAST (students.address.state as
+VarChar(20)), CAST (students.address.street as VarChar(20)), CAST
+(students.address.zipcode as VarChar(20)), FROM hbase.students;</code></p>
+
+<p><strong>Note:</strong> Use the following format when you query a column in an HBase table:<br>
+   <code>tablename.columnfamilyname.columnname</code><br>
+   For more information about column families, refer to <a href="http://hbase.apache.org/book/columnfamily.html">5.6. Column
+Family</a>.</p>
+
+<p>The query returns the data:</p>
+
+<p><code>Query finished, fetching results ...</code></p>
+
+<p><code>+----------+-------+-------+------------------+---------+</code></p>
+
+<p><code>| studentid | name  | state | street           | zipcode |</code></p>
+
+<p><code>+----------+-------+-------+------------------+---------+</code></p>
+
+<p><code>| student1 | Alice | CA    | 123 Ballmer Av   | 12345   |</code></p>
+
+<p><code>| student2 | Bob   | CA    | 1 Infinite Loop  | 12345   |</code></p>
+
+<p><code>| student3 | Frank | CA    | 435 Walker Ct    | 12345   |</code></p>
+
+<p><code>| student4 | Mary  | CA    | 56 Southern Pkwy | 12345   |</code></p>
+
+<p><code>+----------+-------+-------+------------------+---------+</code></p></li>
+</ol>
+
+<p>c. Issue the following query on the “clicks” table to find out which students clicked on google.com:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">   ``SELECT CAST(clicks.clickinfo.studentid as VarChar(200)), CAST(clicks.clickinfo.url as VarChar(200)) FROM hbase.`clicks` WHERE URL LIKE &#39;%google%&#39;;``
+
+   The query returns the data:
+
+
+   `Query finished, fetching results ...`
+
+   `+---------+-----------+-------------------------------+-----------------------+----------+----------+`
+
+   `| clickid | studentid | time                          | url                   | itemtype | quantity |`
+
+   `+---------+-----------+-------------------------------+-----------------------+----------+----------+`
+
+   `| click1  | student1  | 2014-01-01 12:01:01.000100000 | http://www.google.com | image    | 1        |`
+
+   `| click3  | student2  | 2014-01-01 01:02:01.000100000 | http://www.google.com | text     | 2        |`
+
+   `| click6  | student3  | 2013-02-01 12:01:01.000100000 | http://www.google.com | image    | 1        |`
+
+   `+---------+-----------+-------------------------------+-----------------------+----------+----------+`
+</code></pre></div></div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+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.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>

Added: drill/site/trunk/content/drill/docs/querying-hive/index.html
URL: http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/querying-hive/index.html?rev=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/querying-hive/index.html (added)
+++ drill/site/trunk/content/drill/docs/querying-hive/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,151 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>Querying Hive - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>Querying Hive</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>This is a simple exercise that provides steps for creating a Hive table and
+inserting data that you can query using Drill. Before you perform the steps,
+download the <a href="http://doc.mapr.com/download/attachments/22906623%0A/customers.csv?api=v2">customers.csv</a> file.</p>
+
+<p>To create a Hive table and query it with Drill, complete the following steps:</p>
+
+<ol>
+<li><p>Issue the following command to start the Hive shell:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">hive
+</code></pre></div></li>
+<li><p>Issue the following command from the Hive shell to import the <code>customers.csv</code> file and create a table:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">hive&gt; create table customers(FirstName string,
+LastName string,Company string,Address string,
+City string,County string,State string,Zip string,
+Phone string,Fax string,Email string,Web string)
+row format delimited fields terminated by &#39;,&#39; stored as textfile;
+</code></pre></div></li>
+<li><p>Issue the following command to load the customer data into the customers table:  </p>
+
+<p><code>Hive&gt; load data local inpath &#39;/&lt;directory path&gt;/customers.csv&#39; overwrite into table customers;</code></p></li>
+<li><p>Issue <code>quit</code> or <code>exit</code> to leave the Hive shell.</p></li>
+<li><p>Start Drill. Refer to <a href="/confluence/pages/viewpage.action?pageId=44994063">Starting/Stopping Drill</a> for instructions.</p></li>
+<li><p>Issue the following query to Drill to get the first and last names of the first ten customers in the Hive table:  </p>
+
+<p><code>0: jdbc:drill:schema=hiveremote&gt; SELECT firstname,lastname FROM hiveremote.</code>customers<code>limit 10;</code></p>
+
+<p>The query returns the following results:</p>
+
+<p><code>+------------+------------+</code></p>
+
+<p><code>| firstname  |  lastname  |</code></p>
+
+<p><code>+------------+------------+</code></p>
+
+<p><code>| Essie      | Vaill      |</code></p>
+
+<p><code>| Cruz       | Roudabush  |</code></p>
+
+<p><code>| Billie     | Tinnes     |</code></p>
+
+<p><code>| Zackary    | Mockus     |</code></p>
+
+<p><code>| Rosemarie  | Fifield    |</code></p>
+
+<p><code>| Bernard    | Laboy      |</code></p>
+
+<p><code>| Sue        | Haakinson  |</code></p>
+
+<p><code>| Valerie    | Pou        |</code></p>
+
+<p><code>| Lashawn    | Hasty      |</code></p>
+
+<p><code>| Marianne   | Earman     |</code></p>
+
+<p><code>+------------+------------+</code></p>
+
+<p><code>10 rows selected (1.5 seconds)</code></p>
+
+<p><code>0: jdbc:drill:schema=hiveremote&gt;</code></p></li>
+</ol>
+</div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+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.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>

Added: drill/site/trunk/content/drill/docs/querying-json-files/index.html
URL: http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/querying-json-files/index.html?rev=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/querying-json-files/index.html (added)
+++ drill/site/trunk/content/drill/docs/querying-json-files/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,127 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>Querying JSON Files - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>Querying JSON Files</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>Your Drill installation includes a sample JSON file located in Drill&#39;s
+classpath. The sample JSON file, <code>employee.json</code>, contains fictitious employee
+data. Use SQL syntax to query the sample <code>JSON</code> file.</p>
+
+<p>To view the data in the <code>employee.json</code> file, submit the following SQL query
+to Drill:</p>
+
+<p><code>0: jdbc:drill:zk=local&gt; SELECT * FROM cp.`employee.json`;</code></p>
+
+<p>The query returns the following results:</p>
+
+<p><strong>Example of partial output</strong></p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">+-------------+------------+------------+------------+-------------+-----------+
+| employee_id | full_name  | first_name | last_name  | position_id | position_ |
++-------------+------------+------------+------------+-------------+-----------+
+| 1101        | Steve Eurich | Steve      | Eurich     | 16          | Store T |
+| 1102        | Mary Pierson | Mary       | Pierson    | 16          | Store T |
+| 1103        | Leo Jones  | Leo        | Jones      | 16          | Store Tem |
+| 1104        | Nancy Beatty | Nancy      | Beatty     | 16          | Store T |
+| 1105        | Clara McNight | Clara      | McNight    | 16          | Store  |
+| 1106        | Marcella Isaacs | Marcella   | Isaacs     | 17          | Stor |
+| 1107        | Charlotte Yonce | Charlotte  | Yonce      | 17          | Stor |
+| 1108        | Benjamin Foster | Benjamin   | Foster     | 17          | Stor |
+| 1109        | John Reed  | John       | Reed       | 17          | Store Per |
+| 1110        | Lynn Kwiatkowski | Lynn       | Kwiatkowski | 17          | St |
+| 1111        | Donald Vann | Donald     | Vann       | 17          | Store Pe |
+| 1112        | William Smith | William    | Smith      | 17          | Store  |
+| 1113        | Amy Hensley | Amy        | Hensley    | 17          | Store Pe |
+| 1114        | Judy Owens | Judy       | Owens      | 17          | Store Per |
+| 1115        | Frederick Castillo | Frederick  | Castillo   | 17          | S |
+| 1116        | Phil Munoz | Phil       | Munoz      | 17          | Store Per |
+| 1117        | Lori Lightfoot | Lori       | Lightfoot  | 17          | Store |
+...
++-------------+------------+------------+------------+-------------+-----------+
+1,155 rows selected (0.762 seconds)
+0: jdbc:drill:zk=local&gt;
+</code></pre></div></div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+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.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>

Added: drill/site/trunk/content/drill/docs/querying-parquet-files/index.html
URL: http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/querying-parquet-files/index.html?rev=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/querying-parquet-files/index.html (added)
+++ drill/site/trunk/content/drill/docs/querying-parquet-files/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,187 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>Querying Parquet Files - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>Querying Parquet Files</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>Your Drill installation includes a <code>sample-date</code> directory with Parquet files
+that you can query. Use SQL syntax to query the <code>region.parquet</code> and
+<code>nation.parquet</code> files in the <code>sample-data</code> directory.</p>
+
+<p><strong>Note:</strong> Your Drill installation location may differ from the examples used here. The examples assume that Drill was installed in embedded mode on your machine following the <a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes">Apache Drill in 10 Minutes </a>tutorial. If you installed Drill in distributed mode, or your <code>sample-data</code> directory differs from the location used in the examples, make sure to change the <code>sample-data</code> directory to the correct location before you run the queries.</p>
+
+<h4 id="region-file">Region File</h4>
+
+<p>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.</p>
+
+<p>To view the data in the <code>region.parquet</code> file, issue the query appropriate for
+your operating system:</p>
+
+<ul>
+<li><p>Linux<br>
+<code>SELECT * FROM dfs.`/opt/drill/apache-drill-0.4.0-incubating/sample-
+data/region.parquet`;</code></p>
+
+<ul>
+<li>Mac OS X<br>
+<code>SELECT * FROM dfs.`/Users/max/drill/apache-drill-0.4.0-incubating/sample-
+data/region.parquet`;</code></li>
+<li>Windows<br>
+<code>SELECT * FROM dfs.`C:\drill\apache-drill-0.4.0-incubating\sample-
+data\region.parquet`;</code></li>
+</ul></li>
+</ul>
+
+<p>The query returns the following results:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">+------------+------------+
+|   EXPR$0   |   EXPR$1   |
++------------+------------+
+| AFRICA     | lar deposits. blithely final packages cajole. regular waters ar |
+| AMERICA    | hs use ironic, even requests. s |
+| ASIA       | ges. thinly even pinto beans ca |
+| EUROPE     | ly final courts cajole furiously final excuse |
+| MIDDLE EAST | uickly special accounts cajole carefully blithely close reques |
++------------+------------+
+5 rows selected (0.165 seconds)
+0: jdbc:drill:zk=local&gt;
+</code></pre></div>
+<h4 id="nation-file">Nation File</h4>
+
+<p>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.</p>
+
+<p>To view the data in the <code>nation.parquet</code> file, issue the query appropriate for
+your operating system:</p>
+
+<ul>
+<li><p>Linux<br>
+<code>SELECT * FROM dfs.`/opt/drill/apache-drill-0.4.0-incubating/sample-
+data/nation.parquet`;</code></p></li>
+<li><p>Mac OS X<br>
+<code>SELECT * FROM dfs.`/Users/max/drill/apache-drill-0.4.0-incubating/sample-
+data/nation.parquet`;</code></p></li>
+<li><p>Windows<br>
+<code>SELECT * FROM dfs.`C:\drill\apache-drill-0.4.0-incubating\sample-
+data\nation.parquet`;</code></p></li>
+</ul>
+
+<p>The query returns the following results:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">+------------+------------+------------+------------+
+|   EXPR$0   |   EXPR$1   |   EXPR$2   |   EXPR$3   |
++------------+------------+------------+------------+
+| 0          | 0          | ALGERIA    |  haggle. carefully final deposits det |
+| 1          | 1          | ARGENTINA  | al foxes promise slyly according to t |
+| 2          | 1          | BRAZIL     | y alongside of the pending deposits.  |
+| 3          | 1          | CANADA     | eas hang ironic, silent packages. sly |
+| 4          | 4          | EGYPT      | y above the carefully unusual theodol |
+| 5          | 0          | ETHIOPIA   | ven packages wake quickly. regu |
+| 6          | 3          | FRANCE     | refully final requests. regular, iron |
+| 7          | 3          | GERMANY    | l platelets. regular accounts x-ray:  |
+| 8          | 2          | INDIA      | ss excuses cajole slyly across the pa |
+| 9          | 2          | INDONESIA  |  slyly express asymptotes. regular de |
+| 10         | 4          | IRAN       | efully alongside of the slyly final d |
+| 11         | 4          | IRAQ       | nic deposits boost atop the quickly f |
+| 12         | 2          | JAPAN      | ously. final, express gifts cajole a |
+| 13         | 4          | JORDAN     | ic deposits are blithely about the ca |
+| 14         | 0          | KENYA      |  pending excuses haggle furiously dep |
+| 15         | 0          | MOROCCO    | rns. blithely bold courts among the c |
+| 16         | 0          | MOZAMBIQUE | s. ironic, unusual asymptotes wake bl |
+| 17         | 1          | PERU       | platelets. blithely pending dependenc |
+| 18         | 2          | CHINA      | c dependencies. furiously express not |
+| 19         | 3          | ROMANIA    | ular asymptotes are about the furious |
+| 20         | 4          | SAUDI ARABIA | ts. silent requests haggle. closely |
+| 21         | 2          | VIETNAM    | hely enticingly express accounts. eve |
+| 22         | 3          | RUSSIA     |  requests against the platelets use n |
+| 23         | 3          | UNITED KINGDOM | eans boost carefully special requ |
+| 24         | 1          | UNITED STATES | y final packages. slow foxes cajol |
++------------+------------+------------+------------+
+25 rows selected (2.401 seconds)
+0: jdbc:drill:zk=local&gt;
+</code></pre></div></div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+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.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>

Added: drill/site/trunk/content/drill/docs/querying-plain-text-files/index.html
URL: http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/querying-plain-text-files/index.html?rev=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/querying-plain-text-files/index.html (added)
+++ drill/site/trunk/content/drill/docs/querying-plain-text-files/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,202 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>Querying Plain Text Files - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>Querying Plain Text Files</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>You can use Drill to access both structured file types and plain text files
+(flat files). This section shows a few simple examples that work on flat
+files:</p>
+
+<ul>
+<li>CSV files (comma-separated values)</li>
+<li>TSV files (tab-separated values)</li>
+<li>PSV files (pipe-separated values)</li>
+</ul>
+
+<p>The examples here show CSV files, but queries against TSV and PSV files return
+equivalent results. However, make sure that your registered storage plugins
+recognize the appropriate file types and extensions. For example, the
+following configuration expects PSV files (files with a pipe delimiter) to
+have a <code>tbl</code> extension, not a <code>psv</code> extension. Drill returns a &quot;file not
+found&quot; error if references to files in queries do not match these conditions.</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">&quot;formats&quot;: {
+    &quot;psv&quot;: {
+      &quot;type&quot;: &quot;text&quot;,
+      &quot;extensions&quot;: [
+        &quot;tbl&quot;
+      ],
+      &quot;delimiter&quot;: &quot;|&quot;
+    }
+</code></pre></div>
+<h2 id="select-*-from-a-csv-file">SELECT * FROM a CSV File</h2>
+
+<p>The first query selects rows from a <code>.csv</code> text file. The file contains seven
+records:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">$ more plays.csv
+
+1599,As You Like It
+1601,Twelfth Night
+1594,Comedy of Errors
+1595,Romeo and Juliet
+1596,The Merchant of Venice
+1610,The Tempest
+1599,Hamlet
+</code></pre></div>
+<p>Drill recognizes each row as an array of values and returns one column for
+each row.</p>
+
+<p>0: jdbc:drill:zk=local&gt; select * from dfs.<code>/Users/brumsby/drill/plays.csv</code>;</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">+------------+
+|  columns   |
++------------+
+| [&quot;1599&quot;,&quot;As You Like It&quot;] |
+| [&quot;1601&quot;,&quot;Twelfth Night&quot;] |
+| [&quot;1594&quot;,&quot;Comedy of Errors&quot;] |
+| [&quot;1595&quot;,&quot;Romeo and Juliet&quot;] |
+| [&quot;1596&quot;,&quot;The Merchant of Venice&quot;] |
+| [&quot;1610&quot;,&quot;The Tempest&quot;] |
+| [&quot;1599&quot;,&quot;Hamlet&quot;] |
++------------+
+7 rows selected (0.089 seconds)
+</code></pre></div>
+<h2 id="columns[n]-syntax">Columns[n] Syntax</h2>
+
+<p>You can use the <code>COLUMNS[n]</code> syntax in the SELECT list to return these CSV
+rows in a more readable, column by column, format. (This syntax uses a zero-
+based index, so the first column is column <code>0</code>.)</p>
+
+<p>0: jdbc:drill:zk=local&gt; select columns[0], columns[1] 
+from dfs.<code>/Users/brumsby/drill/plays.csv</code>;</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">+------------+------------+
+|   EXPR$0   |   EXPR$1   |
++------------+------------+
+| 1599       | As You Like It |
+| 1601       | Twelfth Night |
+| 1594       | Comedy of Errors |
+| 1595       | Romeo and Juliet |
+| 1596       | The Merchant of Venice |
+| 1610       | The Tempest |
+| 1599       | Hamlet     |
++------------+------------+
+7 rows selected (0.137 seconds)
+</code></pre></div>
+<p>You can use aliases to return meaningful column names. Note that <code>YEAR</code> is a
+reserved word, so the <code>Year</code> alias must be enclosed by back ticks.</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">0: jdbc:drill:zk=local&gt; select columns[0] as `Year`, columns[1] as Play 
+from dfs.`/Users/brumsby/drill/plays.csv`;
+
++------------+------------+
+|    Year    |    Play    |
++------------+------------+
+| 1599       | As You Like It |
+| 1601       | Twelfth Night |
+| 1594       | Comedy of Errors |
+| 1595       | Romeo and Juliet |
+| 1596       | The Merchant of Venice |
+| 1610       | The Tempest |
+| 1599       | Hamlet     |
++------------+------------+
+7 rows selected (0.113 seconds)
+</code></pre></div>
+<p>You cannot refer to the aliases in subsequent clauses of the query. Use the
+original <code>columns[n]</code> syntax, as shown in the WHERE clause for the following
+example:</p>
+
+<p>0: jdbc:drill:zk=local&gt; select columns[0] as <code>Year</code>, columns[1] as Play 
+from dfs.<code>/Users/brumsby/drill/plays.csv</code> where columns[0]&gt;1599;</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">+------------+------------+
+|    Year    |    Play    |
++------------+------------+
+| 1601       | Twelfth Night |
+| 1610       | The Tempest |
++------------+------------+
+2 rows selected (0.201 seconds)
+</code></pre></div>
+<p>Note that the restriction with the use of aliases applies to queries against
+all data sources.</p>
+</div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+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.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>

Added: drill/site/trunk/content/drill/docs/querying-system-tables/index.html
URL: http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/querying-system-tables/index.html?rev=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/querying-system-tables/index.html (added)
+++ drill/site/trunk/content/drill/docs/querying-system-tables/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,247 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>Querying System Tables - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>Querying System Tables</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>Drill has a sys database that contains system tables. You can query the system
+tables for information about Drill, including Drill ports, the Drill version
+running on the system, and available Drill options. View the databases in
+Drill to identify the sys database, and then use the sys database to view
+system tables that you can query.</p>
+
+<h2 id="view-drill-databases">View Drill Databases</h2>
+
+<p>Issue the <code>SHOW DATABASES</code> command to view Drill databases.</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">0: jdbc:drill:zk=10.10.100.113:5181&gt; show databases;
++-------------+
+| SCHEMA_NAME |
++-------------+
+| M7          |
+| hive.default|
+| dfs.default |
+| dfs.root    |
+| dfs.views   |
+| dfs.tmp     |
+| dfs.tpcds   |
+| sys         |
+| cp.default  |
+| hbase       |
+| INFORMATION_SCHEMA |
++-------------+
+11 rows selected (0.162 seconds)
+</code></pre></div>
+<p>Drill returns <code>sys</code> in the database results.</p>
+
+<h2 id="use-the-sys-database">Use the Sys Database</h2>
+
+<p>Issue the <code>USE</code> command to select the sys database for subsequent SQL
+requests.</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">0: jdbc:drill:zk=10.10.100.113:5181&gt; use sys;
++------------+--------------------------------+
+|   ok     |  summary                         |
++------------+--------------------------------+
+| true     | Default schema changed to &#39;sys&#39;  |
++------------+--------------------------------+
+1 row selected (0.101 seconds)
+</code></pre></div>
+<h2 id="view-tables">View Tables</h2>
+
+<p>Issue the <code>SHOW TABLES</code> command to view the tables in the sys database.</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">0: jdbc:drill:zk=10.10.100.113:5181&gt; show tables;
++--------------+------------+
+| TABLE_SCHEMA | TABLE_NAME |
++--------------+------------+
+| sys          | drillbits  |
+| sys          | version    |
+| sys          | options    |
++--------------+------------+
+3 rows selected (0.934 seconds)
+0: jdbc:drill:zk=10.10.100.113:5181&gt;
+</code></pre></div>
+<h2 id="query-system-tables">Query System Tables</h2>
+
+<p>Query the drillbits, version, and options tables in the sys database.</p>
+
+<h6 id="query-the-drillbits-table.">Query the drillbits table.</h6>
+<div class="highlight"><pre><code class="language-text" data-lang="text">0: jdbc:drill:zk=10.10.100.113:5181&gt; select * from drillbits;
++------------------+------------+--------------+------------+---------+
+|   host            | user_port | control_port | data_port  |  current|
++-------------------+------------+--------------+------------+--------+
+| qa-node115.qa.lab | 31010     | 31011        | 31012      | true    |
+| qa-node114.qa.lab | 31010     | 31011        | 31012      | false   |
+| qa-node116.qa.lab | 31010     | 31011        | 31012      | false   |
++------------+------------+--------------+------------+---------------+
+3 rows selected (0.146 seconds)
+</code></pre></div>
+<ul>
+<li><p>host<br>
+The name of the node running the Drillbit service.</p></li>
+<li><p>user-port<br>
+The user port address, used between nodes in a cluster for connecting to
+external clients and for the Drill Web UI.  </p></li>
+<li><p>control_port<br>
+The control port address, used between nodes for multi-node installation of
+Apache Drill.</p></li>
+<li><p>data_port<br>
+The data port address, used between nodes for multi-node installation of
+Apache Drill.</p></li>
+<li><p>current<br>
+True means the Drillbit is connected to the session or client running the
+query. This Drillbit is the Foreman for the current session.  </p></li>
+</ul>
+
+<h6 id="query-the-version-table.">Query the version table.</h6>
+<div class="highlight"><pre><code class="language-text" data-lang="text">0: jdbc:drill:zk=10.10.100.113:5181&gt; select * from version;
++------------+----------------+-------------+-------------+------------+
+| commit_id  | commit_message | commit_time | build_email | build_time |
++------------+----------------+-------------+-------------+------------+
+| 108d29fce3d8465d619d45db5f6f433ca3d97619 | DRILL-1635: Additional fix for validation exceptions. | 14.11.2014 @ 02:32:47 UTC | Unknown    | 14.11.2014 @ 03:56:07 UTC |
++------------+----------------+-------------+-------------+------------+
+1 row selected (0.144 seconds)
+</code></pre></div>
+<ul>
+<li><p>commit_id<br>
+The github id of the release you are running. For example, <https://github.com
+/apache/drill/commit/e3ab2c1760ad34bda80141e2c3108f7eda7c9104></p></li>
+<li><p>commit_message<br>
+The message explaining the change.</p></li>
+<li><p>commit_time<br>
+The date and time of the change.</p></li>
+<li><p>build_email<br>
+The email address of the person who made the change, which is unknown in this
+example.</p></li>
+<li><p>build_time<br>
+The time that the release was built.</p></li>
+</ul>
+
+<h6 id="query-the-options-table.">Query the options table.</h6>
+
+<p>Drill provides system, session, and boot options that you can query.</p>
+
+<p>The following example shows a query on the system options:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">0: jdbc:drill:zk=10.10.100.113:5181&gt; select * from options where type=&#39;SYSTEM&#39; limit 10;
++------------+------------+------------+------------+------------+------------+------------+
+|    name   |   kind    |   type    |  num_val   | string_val |  bool_val  | float_val  |
++------------+------------+------------+------------+------------+------------+------------+
+| exec.max_hash_table_size | LONG       | SYSTEM    | 1073741824 | null     | null      | null      |
+| planner.memory.max_query_memory_per_node | LONG       | SYSTEM    | 2048       | null     | null      | null      |
+| planner.join.row_count_estimate_factor | DOUBLE   | SYSTEM    | null      | null      | null      | 1.0       |
+| planner.affinity_factor | DOUBLE  | SYSTEM    | null      | null      | null       | 1.2      |
+| exec.errors.verbose | BOOLEAN | SYSTEM    | null      | null      | false      | null     |
+| planner.disable_exchanges | BOOLEAN   | SYSTEM    | null      | null      | false      | null     |
+| exec.java_compiler_debug | BOOLEAN    | SYSTEM    | null      | null      | true      | null      |
+| exec.min_hash_table_size | LONG       | SYSTEM    | 65536     | null      | null      | null       |
+| exec.java_compiler_janino_maxsize | LONG       | SYSTEM   | 262144    | null      | null      | null      |
+| planner.enable_mergejoin | BOOLEAN    | SYSTEM    | null      | null      | true      | null       |
++------------+------------+------------+------------+------------+------------+------------+
+10 rows selected (0.334 seconds)  
+</code></pre></div>
+<ul>
+<li><p>name<br>
+The name of the option.</p></li>
+<li><p>kind<br>
+The data type of the option value.</p></li>
+<li><p>type<br>
+The type of options in the output: system, session, or boot.</p></li>
+<li><p>num_val<br>
+The default value, which is of the long or int data type; otherwise, null.</p></li>
+<li><p>string_val<br>
+The default value, which is a string; otherwise, null.</p></li>
+<li><p>bool_val<br>
+The default value, which is true or false; otherwise, null.</p></li>
+<li><p>float_val<br>
+The default value, which is of the double, float, or long double data type;
+otherwise, null.</p></li>
+</ul>
+
+<p>For information about how to configure Drill system and session options, see<a href="https://cwiki.apache.org/confluence/display/DR%0AILL/Planning+and+Execution+Options">
+Planning and Execution Options</a>.</p>
+
+<p>For information about how to configure Drill start-up options, see<a href="https://cwiki.apache.org/confluence/display/DRILL/Start-Up+Options"> Start-Up
+Options</a>.</p>
+</div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+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.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>

Added: drill/site/trunk/content/drill/docs/querying-the-information-schema/index.html
URL: http://svn.apache.org/viewvc/drill/site/trunk/content/drill/docs/querying-the-information-schema/index.html?rev=1651949&view=auto
==============================================================================
--- drill/site/trunk/content/drill/docs/querying-the-information-schema/index.html (added)
+++ drill/site/trunk/content/drill/docs/querying-the-information-schema/index.html Thu Jan 15 05:11:44 2015
@@ -0,0 +1,193 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+
+<meta charset="UTF-8">
+
+
+<title>Querying the INFORMATION SCHEMA - Apache Drill</title>
+
+<link href="/css/syntax.css" rel="stylesheet" type="text/css">
+<link href="/css/style.css" rel="stylesheet" type="text/css">
+<link href="/css/arrows.css" rel="stylesheet" type="text/css">
+<link href="/css/button.css" rel="stylesheet" type="text/css">
+
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
+<link rel="icon" href="/favicon.ico" type="image/x-icon">
+
+<script language="javascript" type="text/javascript" src="/js/lib/jquery-1.11.1.min.js"></script>
+<script language="javascript" type="text/javascript" src="/js/lib/jquery.easing.1.3.js"></script>
+<script language="javascript" type="text/javascript" src="/js/modernizr.custom.js"></script>
+<script language="javascript" type="text/javascript" src="/js/script.js"></script>
+
+</head>
+
+<body onResize="resized();">
+
+<div class="bui"></div>
+
+<div id="search">
+<input type="text" placeholder="Enter search term here">
+</div>
+
+<div id="menu" class="mw">
+<ul>
+  <li class="logo"><a href="/"></a></li>
+  <li>
+    <a href="/overview/">Documentation</a>
+    <ul>
+      <li><a href="/overview/">Overview&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="https://cwiki.apache.org/confluence/display/DRILL/Apache+Drill+in+10+Minutes" target="_blank">Drill in 10 Minutes</a></li>
+      <li><a href="/why/">Why Drill? &nbsp;&nbsp;&nbsp;&nbsp;</a></li>
+      <li><a href="/architecture/">Architecture</a></li>
+    </ul>
+  </li>
+  <li>
+    <a href="/community/">Community</a>
+    <ul>
+      <li><a href="/team/">Team</a></li>
+      <li><a href="/community/#events">Events and Meetups</a></li>
+      <li><a href="/community/#mailinglists">Mailing Lists</a></li>
+      <li><a href="/community/#getinvolved">Get Involved</a></li>
+      <li><a href="https://issues.apache.org/jira/browse/DRILL/" target="_blank">Issue Tracker</a></li>
+      <li><a href="https://github.com/apache/drill" target="_blank">GitHub</a></li>
+    </ul>
+  </li>
+  <li><a href="/faq/">FAQ</a></li>
+  <li><a href="/blog/">Blog</a></li>
+  <li style="width:30px; padding-left: 2px; padding-right:10px"><a href="https://twitter.com/apachedrill" target="_blank"><img src="/images/twitterbw.png" alt="" align="center" width="22" style="padding: 0px 10px 1px 0px;"></a> </li>
+  <li class="l"><span>&nbsp;</span></li>
+  <li class="d"><a href="/download/">Download</a></li>
+</ul>
+</div>
+
+<div class="int_title">
+<h1>Querying the INFORMATION SCHEMA</h1>
+
+</div>
+
+<div class="int_text" align="left"><p>When you are using Drill to connect to multiple data sources, you need a
+simple mechanism to discover what each data source contains. The information
+schema is an ANSI standard set of metadata tables that you can query to return
+information about all of your Drill data sources (or schemas). Data sources
+may be databases or file systems; they are all known as &quot;schemas&quot; in this
+context. You can query the following INFORMATION_SCHEMA tables:</p>
+
+<ul>
+<li>SCHEMATA</li>
+<li>CATALOGS</li>
+<li>TABLES</li>
+<li>COLUMNS </li>
+<li>VIEWS</li>
+</ul>
+
+<h2 id="schemata">SCHEMATA</h2>
+
+<p>The SCHEMATA table contains the CATALOG_NAME and SCHEMA_NAME columns. To allow
+maximum flexibility inside BI tools, the only catalog that Drill supports is
+<code>DRILL</code>.</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">0: jdbc:drill:zk=local&gt; select CATALOG_NAME, SCHEMA_NAME as all_my_data_sources from INFORMATION_SCHEMA.SCHEMATA order by SCHEMA_NAME;
++--------------+---------------------+
+| CATALOG_NAME | all_my_data_sources |
++--------------+---------------------+
+| DRILL        | INFORMATION_SCHEMA  |
+| DRILL        | cp.default          |
+| DRILL        | dfs.default         |
+| DRILL        | dfs.root            |
+| DRILL        | dfs.tmp             |
+| DRILL        | HiveTest.SalesDB    |
+| DRILL        | maprfs.logs         |
+| DRILL        | sys                 |
++--------------+---------------------+
+</code></pre></div>
+<p>The INFORMATION_SCHEMA name and associated keywords are case-sensitive. You
+can also return a list of schemas by running the SHOW DATABASES command:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">0: jdbc:drill:zk=local&gt; show databases;
++-------------+
+| SCHEMA_NAME |
++-------------+
+| dfs.default |
+| dfs.root    |
+| dfs.tmp     |
+...
+</code></pre></div>
+<h2 id="catalogs">CATALOGS</h2>
+
+<p>The CATALOGS table returns only one row, with the hardcoded DRILL catalog name
+and description.</p>
+
+<h2 id="tables">TABLES</h2>
+
+<p>The TABLES table returns the table name and type for each table or view in
+your databases. (Type means TABLE or VIEW.) Note that Drill does not return
+files available for querying in file-based data sources. Instead, use SHOW
+FILES to explore these data sources.</p>
+
+<h2 id="columns">COLUMNS</h2>
+
+<p>The COLUMNS table returns the column name and other metadata (such as the data
+type) for each column in each table or view.</p>
+
+<h2 id="views">VIEWS</h2>
+
+<p>The VIEWS table returns the name and definition for each view in your
+databases. Note that file schemas are the canonical repository for views in
+Drill. Depending on how you create a view, the may only be displayed in Drill
+after it has been used.</p>
+
+<h2 id="useful-queries">Useful Queries</h2>
+
+<p>Run an <code>INFORMATION_SCHEMA.`TABLES`</code>query to view all of the tables and views
+within a database. TABLES is a reserved word in Drill and requires back ticks
+(`).</p>
+
+<p>For example, the following query identifies all of the tables and views that
+Drill can access:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE
+FROM INFORMATION_SCHEMA.`TABLES`
+ORDER BY TABLE_NAME DESC;
+----------------------------------------------------------------
+TABLE_SCHEMA             TABLE_NAME            TABLE_TYPE
+----------------------------------------------------------------
+HiveTest.CustomersDB     Customers             TABLE
+HiveTest.SalesDB         Orders                TABLE
+HiveTest.SalesDB         OrderLines            TABLE
+HiveTest.SalesDB         USOrders              VIEW
+dfs.default              CustomerSocialProfile VIEW
+----------------------------------------------------------------
+</code></pre></div>
+<p><strong>Note:</strong> Currently, Drill only supports querying Drill views; Hive views are not yet supported.</p>
+
+<p>You can run a similar query to identify columns in tables and the data types
+of those columns:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text">SELECT COLUMN_NAME, DATA_TYPE 
+FROM INFORMATION_SCHEMA.COLUMNS 
+WHERE TABLE_NAME = &#39;Orders&#39; AND TABLE_SCHEMA = &#39;HiveTest.SalesDB&#39; AND COLUMN_NAME LIKE &#39;%Total&#39;;
++-------------+------------+
+| COLUMN_NAME | DATA_TYPE  |
++-------------+------------+
+| OrderTotal  | Decimal    |
++-------------+------------+
+</code></pre></div></div>
+
+
+<div id="footer" class="mw">
+<div class="wrapper">
+Copyright © 2012-2014 The Apache Software Foundation, licensed under the Apache License, Version 2.0.<br>
+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.<br/><br/>
+</div>
+</div>
+
+<script>
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ga('create', 'UA-53379651-1', 'auto');
+ga('send', 'pageview');
+</script>
+
+</body>
+</html>