This is an automated email from the ASF dual-hosted git repository.

dzamo pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/drill-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 7bd4a32  Fix note block formatting problems, document SPLIT_PART
7bd4a32 is described below

commit 7bd4a32fe18b6f6656c65be7e06b0789851c0399
Author: James Turton <[email protected]>
AuthorDate: Tue Dec 15 06:48:29 2020 +0200

    Fix note block formatting problems, document SPLIT_PART
---
 docs/distributed-mode-prerequisites/index.html |  18 +--
 docs/rdbms-storage-plugin/index.html           | 183 ++++++++++++-------------
 docs/string-manipulation/index.html            |  42 ++++--
 3 files changed, 127 insertions(+), 116 deletions(-)

diff --git a/docs/distributed-mode-prerequisites/index.html 
b/docs/distributed-mode-prerequisites/index.html
index 86cbb9e..91e6a60 100644
--- a/docs/distributed-mode-prerequisites/index.html
+++ b/docs/distributed-mode-prerequisites/index.html
@@ -1370,13 +1370,12 @@
     </div>
 
     <!-- jt: we don't need to display a last-modified date on each page to 
users
-     Dec 10, 2020
+     Dec 11, 2020
     --> 
 
     <div class="int_text" align="left">
       
-        <p>You can install Apache Drill on one or more nodes to
-run it in a clustered environment.</p>
+        <p>You can install Apache Drill on one or more nodes to run it in a 
clustered environment.</p>
 
 <h2 id="prerequisites">Prerequisites</h2>
 
@@ -1386,16 +1385,13 @@ run it in a clustered environment.</p>
   <li>(Required) Running Oracle or OpenJDK 8</li>
   <li>(Required) Running a <a 
href="https://zookeeper.apache.org/doc/r3.1.2/zookeeperStarted.html#sc_RunningReplicatedZooKeeper";>ZooKeeper
 quorum</a></li>
   <li>(Recommended) Running a Hadoop cluster</li>
-  <li>
-    <p>(Recommended) Using DNS</p>
+  <li>(Recommended) Using DNS</li>
+</ul>
 
-    <div class="admonition note">
+<div class="admonition note">
+  <p class="first admonition-title">Note</p>
+  <p class="last">Starting in Drill 1.18 the bundled ZooKeeper libraries are 
upgraded to version 3.5.7, preventing connections to older (&lt; 3.5) ZooKeeper 
clusters.  In order to connect to a ZooKeeper &lt; 3.5 cluster, replace the 
ZooKeeper library JARs in `${DRILL_HOME}/jars/ext` with zookeeper-3.4.x.jar 
then restart the cluster.  </p>
 </div>
-  </li>
-</ul>
-<p class="first admonition-title">Note</p>
-<p class="last">Start from Drill 1.18, ZK version is upgraded to 3.5.7. So by 
default, we can't connect to the old ZK cluster (&lt; 3.5). If we need to use 
the previous ZK, let's do this: first, delete the zookeeper dependency files in 
`${DRILL_HOME}/jars/ext`, then copy zookeeper-3.4.x.jar to the directory, and 
finally restart the cluster.  </p>
-<p>&lt;/div&gt;</p>
 
     
       
diff --git a/docs/rdbms-storage-plugin/index.html 
b/docs/rdbms-storage-plugin/index.html
index 7718c37..032a668 100644
--- a/docs/rdbms-storage-plugin/index.html
+++ b/docs/rdbms-storage-plugin/index.html
@@ -1368,7 +1368,7 @@
     </div>
 
     <!-- jt: we don't need to display a last-modified date on each page to 
users
-     Dec 10, 2020
+     Dec 11, 2020
     --> 
 
     <div class="int_text" align="left">
@@ -1413,35 +1413,27 @@ section for the example of usage.</p>
 <ol>
   <li><a href="/docs/starting-drill-on-linux-and-mac-os-x/">Start the Drill 
shell</a>.</li>
   <li><a href="/docs/starting-the-web-console/">Start the Web UI</a>.</li>
-  <li>
-    <p>On the Storage tab, enter a name in <strong>New Storage 
Plugin</strong>. For example, enter <code class="language-plaintext 
highlighter-rouge">myplugin</code>.
-Each configuration registered with Drill must have a distinct name. Names are 
case-sensitive.</p>
-
-    <div class="admonition note">
-</div>
-  </li>
-</ol>
-<p class="first admonition-title">Note</p>
-<p class="last">The URL differs depending on your installation and 
configuration. See the example configurations below for examples.  </p>
-<p>&lt;/div&gt;</p>
-<ol>
+  <li>On the Storage tab, enter a name in <strong>New Storage Plugin</strong>. 
For example, enter <code class="language-plaintext 
highlighter-rouge">myplugin</code>.
+Each configuration registered with Drill must have a distinct name. Names are 
case-sensitive.</li>
   <li>Click <strong>Create</strong>.</li>
-  <li>
-    <p>In Configuration, set the required properties using JSON formatting as 
shown in the following example. Change the properties to match your 
environment.</p>
-
-    <div class="language-plaintext highlighter-rouge"><div 
class="highlight"><pre class="highlight"><code> {
-   "type": "jdbc",
-   "driver": "com.mysql.jdbc.Driver",
-   "url": "jdbc:mysql://localhost:3306",
-   "username": "root",
-   "password": "mypassword",
-   "enabled": true
- }  
-</code></pre></div>    </div>
+  <li>In Configuration, set the required properties using JSON formatting as 
shown in the following example. Change the properties to match your environment.
+    <div class="language-json highlighter-rouge"><div class="highlight"><pre 
class="highlight"><code><span class="p">{</span><span class="w">
+  </span><span class="nl">"type"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"jdbc"</span><span class="p">,</span><span 
class="w">
+  </span><span class="nl">"driver"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"com.mysql.jdbc.Driver"</span><span 
class="p">,</span><span class="w">
+  </span><span class="nl">"url"</span><span class="p">:</span><span class="w"> 
</span><span class="s2">"jdbc:mysql://localhost:3306"</span><span 
class="p">,</span><span class="w">
+  </span><span class="nl">"username"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"root"</span><span class="p">,</span><span 
class="w">
+  </span><span class="nl">"password"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"mypassword"</span><span 
class="p">,</span><span class="w">
+  </span><span class="nl">"enabled"</span><span class="p">:</span><span 
class="w"> </span><span class="kc">true</span><span class="w">
+</span><span class="p">}</span><span class="w">  
+</span></code></pre></div>    </div>
   </li>
-  <li>Click <strong>Create</strong>.</li>
 </ol>
 
+<div class="admonition note">
+  <p class="first admonition-title">Note</p>
+  <p class="last">The JDBC URL may differ depending on your installation and 
configuration. See the example configurations below for examples.  </p>
+</div>
+
 <p>You can use the performance_schema database, which is installed with MySQL 
to query your MySQL performance_schema database. Include the names of the 
storage plugin configuration, the database, and table in dot notation the FROM 
clause as follows:</p>
 
 <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre 
class="highlight"><code>  0: jdbc:drill:zk=local&gt; select * from 
myplugin.performance_schema.accounts;
@@ -1461,13 +1453,13 @@ Each configuration registered with Drill must have a 
distinct name. Names are ca
 
 <p>Download and install Oracle’s Thin <a 
href="http://www.oracle.com/technetwork/database/features/jdbc/default-2280470.html";>ojdbc7.12.1.0.2.jar</a>
 driver and copy it to all nodes in your cluster.</p>
 
-<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre 
class="highlight"><code>{
-  type: "jdbc",
-  enabled: true,
-  driver: "oracle.jdbc.OracleDriver",
-  url: "jdbc:oracle:thin:user/[email protected]:1521/ORCL"
-}
-</code></pre></div></div>
+<div class="language-json highlighter-rouge"><div class="highlight"><pre 
class="highlight"><code><span class="p">{</span><span class="w">
+  </span><span class="nl">"type"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"jdbc"</span><span class="p">,</span><span 
class="w">
+  </span><span class="nl">"enabled"</span><span class="p">:</span><span 
class="w"> </span><span class="kc">true</span><span class="p">,</span><span 
class="w">
+  </span><span class="s2">"driver:"</span><span class="w"> </span><span 
class="s2">"oracle.jdbc.OracleDriver"</span><span class="p">,</span><span 
class="w">
+  </span><span class="s2">"url:"</span><span class="w"> </span><span 
class="s2">"jdbc:oracle:thin:user/[email protected]:1521/ORCL"</span><span 
class="w">
+</span><span class="p">}</span><span class="w">
+</span></code></pre></div></div>
 
 <h3 id="example-sql-server-configuration">Example SQL Server Configuration</h3>
 
@@ -1477,30 +1469,28 @@ Each configuration registered with Drill must have a 
distinct name. Names are ca
   <p class="first admonition-title">Note</p>
   <p class="last">You'll need to provide a database name as part of your JDBC 
connection string for Drill to correctly expose MSSQL schemas.  </p>
 </div>
-
-<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre 
class="highlight"><code>{
-  type: "jdbc",
-  enabled: true,
-  driver: "com.microsoft.sqlserver.jdbc.SQLServerDriver",
-  url: "jdbc:sqlserver://1.2.3.4:1433;databaseName=mydatabase",
-  username: "user",
-  password: "password"
-}
-</code></pre></div></div>
+<div class="language-json highlighter-rouge"><div class="highlight"><pre 
class="highlight"><code><span class="p">{</span><span class="w">
+  </span><span class="nl">"type"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"jdbc"</span><span class="p">,</span><span 
class="w">
+  </span><span class="nl">"enabled"</span><span class="p">:</span><span 
class="w"> </span><span class="kc">true</span><span class="p">,</span><span 
class="w">
+  </span><span class="nl">"driver"</span><span class="p">:</span><span 
class="w"> </span><span 
class="s2">"com.microsoft.sqlserver.jdbc.SQLServerDriver"</span><span 
class="p">,</span><span class="w">
+  </span><span class="nl">"url"</span><span class="p">:</span><span class="w"> 
</span><span 
class="s2">"jdbc:sqlserver://1.2.3.4:1433;databaseName=mydatabase"</span><span 
class="p">,</span><span class="w">
+  </span><span class="nl">"username"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"user"</span><span class="p">,</span><span 
class="w">
+  </span><span class="nl">"password"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"password"</span><span class="w">
+</span><span class="p">}</span><span class="w">
+</span></code></pre></div></div>
 
 <h3 id="example-mysql-configuration">Example MySQL Configuration</h3>
 
 <p>For MySQL, Drill has been tested with MySQL’s <a 
href="http://dev.mysql.com/downloads/connector/j/";>mysql-connector-java-5.1.37-bin.jar</a>
 driver. Copy this to all nodes.</p>
-
-<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre 
class="highlight"><code>{
-  type: "jdbc",
-  enabled: true,
-  driver: "com.mysql.jdbc.Driver",
-  url: "jdbc:mysql://1.2.3.4",
-  username: "user",
-  password: "password"
-}  
-</code></pre></div></div>
+<div class="language-json highlighter-rouge"><div class="highlight"><pre 
class="highlight"><code><span class="p">{</span><span class="w">
+  </span><span class="nl">"type"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"jdbc"</span><span class="p">,</span><span 
class="w">
+  </span><span class="nl">"enabled"</span><span class="p">:</span><span 
class="w"> </span><span class="kc">true</span><span class="p">,</span><span 
class="w">
+  </span><span class="nl">"driver"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"com.mysql.jdbc.Driver"</span><span 
class="p">,</span><span class="w">
+  </span><span class="nl">"url"</span><span class="p">:</span><span class="w"> 
</span><span class="s2">"jdbc:mysql://1.2.3.4"</span><span 
class="p">,</span><span class="w">
+  </span><span class="nl">"username"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"user"</span><span class="p">,</span><span 
class="w">
+  </span><span class="nl">"password"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"password"</span><span class="w">
+</span><span class="p">}</span><span class="w">  
+</span></code></pre></div></div>
 
 <h3 id="example-postgres-configuration">Example Postgres Configuration</h3>
 
@@ -1512,61 +1502,60 @@ Each configuration registered with Drill must have a 
distinct name. Names are ca
   <p class="last">You'll need to provide a database name as part of your JDBC 
connection string for Drill to correctly expose Postgres tables.  </p>
 </div>
 
-<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre 
class="highlight"><code>{
-  type: "jdbc",
-  enabled: true,
-  driver: "org.postgresql.Driver",
-  url: "jdbc:postgresql://1.2.3.4/mydatabase",
-  username: "user",
-  password: "password"
-}  
-</code></pre></div></div>
+<div class="language-json highlighter-rouge"><div class="highlight"><pre 
class="highlight"><code><span class="p">{</span><span class="w">
+  </span><span class="nl">"type"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"jdbc"</span><span class="p">,</span><span 
class="w">
+  </span><span class="nl">"enabled"</span><span class="p">:</span><span 
class="w"> </span><span class="kc">true</span><span class="p">,</span><span 
class="w">
+  </span><span class="nl">"driver"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"org.postgresql.Driver"</span><span 
class="p">,</span><span class="w">
+  </span><span class="nl">"url"</span><span class="p">:</span><span class="w"> 
</span><span class="s2">"jdbc:postgresql://1.2.3.4/mydatabase"</span><span 
class="p">,</span><span class="w">
+  </span><span class="nl">"username"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"user"</span><span class="p">,</span><span 
class="w">
+  </span><span class="nl">"password"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"password"</span><span class="w">
+</span><span class="p">}</span><span class="w">  
+</span></code></pre></div></div>
 
 <p>You may need to qualify a table name with a schema name for Drill to return 
data. For example, when querying a table named ips, you must issue the query 
against public.ips, as shown in the following example:</p>
 
 <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre 
class="highlight"><code>   0: jdbc:drill:zk=local&gt; use pgdb;          
-   |-------|-----------------------------------|
-   |  ok   |           summary                 |
-   |-------|-----------------------------------|
-   | true  | Default schema changed to [pgdb]  |
-   |-------|-----------------------------------|
+   |------|----------------------------------|
+   | ok   | summary                          |
+   |------|----------------------------------|
+   | true | Default schema changed to [pgdb] |
+   |------|----------------------------------|
     
    0: jdbc:drill:zk=local&gt; show tables;          
-   |---------------|--------------------------|
-   | TABLE_SCHEMA  |        TABLE_NAME         |
-   |---------------|--------------------------|
-   | pgdb.test         | ips                   |
-   | pgdb.test         | pg_aggregate          |
-   | pgdb.test         | pg_am                 | 
-   …  
+   |--------------|--------------|
+   | TABLE_SCHEMA | TABLE_NAME   |
+   |--------------|--------------|
+   | pgdb.test    | ips          |
+   | pgdb.test    | pg_aggregate |
+   | pgdb.test    | pg_am        |
+   |--------------|--------------|
 
    0: jdbc:drill:zk=local&gt; select * from public.ips;          
-   |-------|----------|
-   | ipid  | ipv4dot  |
-   |-------|----------|
-   | 1         | 1.2.3.4  |
-   | 2         | 1.2.3.5  |
-   |-------|----------|
+   |------|---------|
+   | ipid | ipv4dot |
+   |------|---------|
+   | 1    | 1.2.3.4 |
+   | 2    | 1.2.3.5 |
+   |------|---------|
 </code></pre></div></div>
 
 <h3 
id="example-of-postgres-configuration-with-sourceparameters-configuration-property">Example
 of Postgres Configuration with <code class="language-plaintext 
highlighter-rouge">sourceParameters</code> configuration property</h3>
-
-<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre 
class="highlight"><code>{
-  type: "jdbc",
-  enabled: true,
-  driver: "org.postgresql.Driver",
-  url: "jdbc:postgresql://1.2.3.4/mydatabase?defaultRowFetchSize=2",
-  username: "user",
-  password: "password",
-  sourceParameters: {
-    "minimumIdle": 5,
-    "autoCommit": false,
-    "connectionTestQuery": "select version() as postgresql_version",
-    "dataSource.cachePrepStmts": true,
-    "dataSource.prepStmtCacheSize": 250
-  }
-}  
-</code></pre></div></div>
+<div class="language-json highlighter-rouge"><div class="highlight"><pre 
class="highlight"><code><span class="p">{</span><span class="w">
+  </span><span class="nl">"type"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"jdbc"</span><span class="p">,</span><span 
class="w">
+  </span><span class="nl">"enabled"</span><span class="p">:</span><span 
class="w"> </span><span class="kc">true</span><span class="p">,</span><span 
class="w">
+  </span><span class="nl">"driver"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"org.postgresql.Driver"</span><span 
class="p">,</span><span class="w">
+  </span><span class="nl">"url"</span><span class="p">:</span><span class="w"> 
</span><span 
class="s2">"jdbc:postgresql://1.2.3.4/mydatabase?defaultRowFetchSize=2"</span><span
 class="p">,</span><span class="w">
+  </span><span class="nl">"username"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"user"</span><span class="p">,</span><span 
class="w">
+  </span><span class="nl">"password"</span><span class="p">:</span><span 
class="w"> </span><span class="s2">"password"</span><span 
class="p">,</span><span class="w">
+  </span><span class="nl">"sourceParameters"</span><span 
class="p">:</span><span class="w"> </span><span class="p">{</span><span 
class="w">
+    </span><span class="nl">"minimumIdle"</span><span class="p">:</span><span 
class="w"> </span><span class="mi">5</span><span class="p">,</span><span 
class="w">
+    </span><span class="nl">"autoCommit"</span><span class="p">:</span><span 
class="w"> </span><span class="kc">false</span><span class="p">,</span><span 
class="w">
+    </span><span class="nl">"connectionTestQuery"</span><span 
class="p">:</span><span class="w"> </span><span class="s2">"select version() as 
postgresql_version"</span><span class="p">,</span><span class="w">
+    </span><span class="nl">"dataSource.cachePrepStmts"</span><span 
class="p">:</span><span class="w"> </span><span class="kc">true</span><span 
class="p">,</span><span class="w">
+    </span><span class="nl">"dataSource.prepStmtCacheSize"</span><span 
class="p">:</span><span class="w"> </span><span class="mi">250</span><span 
class="w">
+  </span><span class="p">}</span><span class="w">
+</span><span class="p">}</span><span class="w">  
+</span></code></pre></div></div>
 
     
       
diff --git a/docs/string-manipulation/index.html 
b/docs/string-manipulation/index.html
index 172754f..592d60a 100644
--- a/docs/string-manipulation/index.html
+++ b/docs/string-manipulation/index.html
@@ -1370,7 +1370,7 @@
     </div>
 
     <!-- jt: we don't need to display a last-modified date on each page to 
users
-     Dec 10, 2020
+     Dec 15, 2020
     --> 
 
     <div class="int_text" align="left">
@@ -1462,6 +1462,10 @@
       <td>INTEGER</td>
     </tr>
     <tr>
+      <td><a href="/docs/string-manipulation/#split_part">SPLIT_PART</a></td>
+      <td>VARCHAR</td>
+    </tr>
+    <tr>
       <td><a href="/docs/string-manipulation/#strpos">STRPOS</a></td>
       <td>INTEGER</td>
     </tr>
@@ -1487,7 +1491,7 @@
 <div class="admonition note">
   <p class="first admonition-title">Note</p>
   <p class="last">
-As with indexes througout SQL, indexes into character strings are 1-based.
+As is the case for indexes througout SQL, indexes into character strings are 
1-based.
   </p>
 </div>
 
@@ -1997,8 +2001,30 @@ SELECT RTRIM('1.0 Apache Tomcat 1.0', 'Drill 1.0') from 
(VALUES(1));
 |------------------------------------|
 </code></pre></div></div>
 
+<h2 id="split_part">SPLIT_PART</h2>
+<p>Return the string part at <em>index</em> after splitting the input string 
using the specified delimiter.</p>
+
+<h3 id="split_part-syntax">SPLIT_PART Syntax</h3>
+<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre 
class="highlight"><code>SPLIT_PART(string, delimiter, index)
+</code></pre></div></div>
+
+<h3 id="split_part-usage-notes">SPLIT_PART Usage Notes</h3>
+<p>The <em>delimiter</em> string may be multiple characters long.  The 
<em>index</em> must be a positive integer.</p>
+
+<h3 id="split_part-examples">SPLIT_PART Examples</h3>
+
+<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre 
class="highlight"><code>SELECT split_part('The | quick | brown | fox | jumps', 
' | ', 4);
+
+|--------|
+| EXPR$0 |
+|--------|
+| fox    |
+|--------|
+</code></pre></div></div>
+
 <h2 id="strpos">STRPOS</h2>
-<p>Returns the location of the first occurrence of a substring of the input 
string, or 0 if the substring does not occur.</p>
+<p>Returns the location of the first occurrence of a substring of the input
+string, or 0 if the substring does not occur.</p>
 
 <h3 id="strpos-syntax">STRPOS Syntax</h3>
 
@@ -2008,11 +2034,11 @@ SELECT RTRIM('1.0 Apache Tomcat 1.0', 'Drill 1.0') from 
(VALUES(1));
 
 <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre 
class="highlight"><code>SELECT STRPOS('Apache Drill', 'Drill') FROM (VALUES(1));
 
-|------------|
-|   EXPR$0   |
-|------------|
-| 8          |
-|------------|
+|--------|
+| EXPR$0 |
+|--------|
+| 8      |
+|--------|
 1 row selected (0.22 seconds)
 </code></pre></div></div>
 

Reply via email to