You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by br...@apache.org on 2015/10/31 00:34:15 UTC

drill-site git commit: edits from Kris

Repository: drill-site
Updated Branches:
  refs/heads/asf-site 777ba0120 -> e70f2bc16


edits from Kris


Project: http://git-wip-us.apache.org/repos/asf/drill-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill-site/commit/e70f2bc1
Tree: http://git-wip-us.apache.org/repos/asf/drill-site/tree/e70f2bc1
Diff: http://git-wip-us.apache.org/repos/asf/drill-site/diff/e70f2bc1

Branch: refs/heads/asf-site
Commit: e70f2bc16b07742c3990a03ec8c94b247694fc05
Parents: 777ba01
Author: Bridget Bevens <bb...@maprtech.com>
Authored: Fri Oct 30 16:33:59 2015 -0700
Committer: Bridget Bevens <bb...@maprtech.com>
Committed: Fri Oct 30 16:33:59 2015 -0700

----------------------------------------------------------------------
 docs/json-data-model/index.html                    | 14 +++++++++++---
 docs/math-and-trig/index.html                      |  2 +-
 docs/starting-drill-in-distributed-mode/index.html | 11 +++++++++++
 feed.xml                                           |  4 ++--
 4 files changed, 25 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill-site/blob/e70f2bc1/docs/json-data-model/index.html
----------------------------------------------------------------------
diff --git a/docs/json-data-model/index.html b/docs/json-data-model/index.html
index 597e56a..93d5b10 100644
--- a/docs/json-data-model/index.html
+++ b/docs/json-data-model/index.html
@@ -1019,7 +1019,7 @@
 
 <p>Using Drill you can natively query dynamic JSON data sets using SQL. Drill treats a JSON object as a SQL record. One object equals one row in a Drill table.</p>
 
-<p>You can also <a href="/docs/querying-plain-text-files/#querying-compressed-files">query compressed .gz files</a> having JSON as well as uncompressed .json files.</p>
+<p>You can also <a href="/docs/querying-plain-text-files/#querying-compressed-files">query compressed .gz JSON files</a>.</p>
 
 <p>In addition to the examples presented later in this section, see <a href="https://www.mapr.com/blog/how-analyze-highly-dynamic-datasets-apache-drill">&quot;How to Analyze Highly Dynamic Datasets with Apache Drill&quot;</a> for information about how to analyze a JSON data set.</p>
 
@@ -1106,8 +1106,16 @@ Reads all data from JSON files as VARCHAR. You need to cast numbers from VARCHAR
 <div class="highlight"><pre><code class="language-text" data-lang="text">{ name: &quot;Apples&quot;, desc: &quot;Delicious&quot; }
 { name: &quot;Oranges&quot;, desc: &quot;Florida Navel&quot; }
 </code></pre></div>
-<p>To read and <a href="/docs/json-data-model#analyzing-json">analyze complex JSON</a> files, use the FLATTEN and KVGEN functions.</p>
-
+<p>To read and <a href="/docs/json-data-model#analyzing-json">analyze complex JSON</a> files, use the FLATTEN and KVGEN functions. For example, you need to flatten the data to read all the names in this JSON file:</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text"> {&quot;Fruits: [{&quot;name&quot;:&quot;Apples&quot;, &quot;quantity&quot;:115},
+            {&quot;name&quot;:&quot;Oranges&quot;,&quot;quantity&quot;:199},
+            {&quot;name&quot;:&quot;Peaches&quot;, &quot;quantity&quot;:116}
+           ]
+ }
+</code></pre></div>
+<p>To flatten the data and read the names, use a subquery that flattens the complex nesting. Use table aliases, t and flatdata, to resolve ambiguities.</p>
+<div class="highlight"><pre><code class="language-text" data-lang="text"> SELECT t.flatdata.name FROM (select flatten(Fruits) AS flatdata FROM dfs.`/Users/path/fruits.json`) t;
+</code></pre></div>
 <h2 id="writing-json">Writing JSON</h2>
 
 <p>You can write data from Drill to a JSON file. The following setup is required:</p>

http://git-wip-us.apache.org/repos/asf/drill-site/blob/e70f2bc1/docs/math-and-trig/index.html
----------------------------------------------------------------------
diff --git a/docs/math-and-trig/index.html b/docs/math-and-trig/index.html
index 9a739f5..b0c2213 100644
--- a/docs/math-and-trig/index.html
+++ b/docs/math-and-trig/index.html
@@ -1130,7 +1130,7 @@
 <tr>
 <td>ROUND(x, y)</td>
 <td>DECIMAL</td>
-<td>Rounds x to s decimal places.</td>
+<td>Rounds x to y decimal places.</td>
 </tr>
 <tr>
 <td>RSHIFT(x, y)</td>

http://git-wip-us.apache.org/repos/asf/drill-site/blob/e70f2bc1/docs/starting-drill-in-distributed-mode/index.html
----------------------------------------------------------------------
diff --git a/docs/starting-drill-in-distributed-mode/index.html b/docs/starting-drill-in-distributed-mode/index.html
index db34a57..9b639ed 100644
--- a/docs/starting-drill-in-distributed-mode/index.html
+++ b/docs/starting-drill-in-distributed-mode/index.html
@@ -1082,6 +1082,17 @@ Drill lists information about the Drillbits that are running, such as the host n
 
 <p><code>bin/sqlline –u jdbc:drill:zk=cento23,zk=centos24,zk=centos26:5181</code></p>
 
+<h2 id="making-a-direct-drillbit-connection">Making a Direct Drillbit Connection</h2>
+
+<p>If you want to connect directly to a Drillbit instead of using ZooKeeper to choose the Drillbit, replace <code>zk=&lt;zk name&gt;</code> with <code>drillbit=&lt;node&gt;</code> as shown in the following URL.</p>
+
+<p><code>jdbc:drill:[schema=&lt;storage plugin&gt;;]drillbit=&lt;node name&gt;[:&lt;port&gt;][,&lt;node name2&gt;[:&lt;port&gt;]...</code><br>
+  <code>]&lt;directory&gt;/&lt;cluster ID&gt;</code></p>
+
+<p>where</p>
+
+<p><code>drillbit=&lt;node name&gt;</code> specifies one or more host names or IP addresses of cluster nodes running Drill. </p>
+
 <h2 id="exiting-the-drill-shell">Exiting the Drill Shell</h2>
 
 <p>To exit the Drill shell, issue the following command:</p>

http://git-wip-us.apache.org/repos/asf/drill-site/blob/e70f2bc1/feed.xml
----------------------------------------------------------------------
diff --git a/feed.xml b/feed.xml
index d3fc407..c20b15c 100644
--- a/feed.xml
+++ b/feed.xml
@@ -6,8 +6,8 @@
 </description>
     <link>/</link>
     <atom:link href="/feed.xml" rel="self" type="application/rss+xml"/>
-    <pubDate>Mon, 26 Oct 2015 17:53:14 -0700</pubDate>
-    <lastBuildDate>Mon, 26 Oct 2015 17:53:14 -0700</lastBuildDate>
+    <pubDate>Fri, 30 Oct 2015 16:29:14 -0700</pubDate>
+    <lastBuildDate>Fri, 30 Oct 2015 16:29:14 -0700</lastBuildDate>
     <generator>Jekyll v2.5.2</generator>
     
       <item>