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 2019/04/05 20:20:30 UTC
[drill] branch gh-pages updated: edits to install drill on windows
This is an automated email from the ASF dual-hosted git repository.
bridgetb pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/drill.git
The following commit(s) were added to refs/heads/gh-pages by this push:
new 5beb1e7 edits to install drill on windows
5beb1e7 is described below
commit 5beb1e76c2362e2f9b87188cc9f005081d5e8ef9
Author: Bridget Bevens <bb...@maprtech.com>
AuthorDate: Fri Apr 5 13:19:06 2019 -0700
edits to install drill on windows
---
_docs/img/install-windows-2-2.png | Bin 0 -> 62872 bytes
_docs/img/install-windows-2.png | Bin 0 -> 44607 bytes
_docs/img/install-windows-3.png | Bin 0 -> 22135 bytes
_docs/img/install-windows-5.png | Bin 0 -> 124029 bytes
_docs/img/install-windows-6.png | Bin 0 -> 107507 bytes
_docs/img/query_directories_structure.png | Bin 0 -> 64806 bytes
.../040-installing-drill-on-windows.md | 48 +++++++++--
.../060-querying-the-information-schema.md | 4 +-
.../040-querying-directories.md | 91 +++++++++++++--------
9 files changed, 102 insertions(+), 41 deletions(-)
diff --git a/_docs/img/install-windows-2-2.png b/_docs/img/install-windows-2-2.png
new file mode 100644
index 0000000..ce194d6
Binary files /dev/null and b/_docs/img/install-windows-2-2.png differ
diff --git a/_docs/img/install-windows-2.png b/_docs/img/install-windows-2.png
new file mode 100644
index 0000000..7366f77
Binary files /dev/null and b/_docs/img/install-windows-2.png differ
diff --git a/_docs/img/install-windows-3.png b/_docs/img/install-windows-3.png
new file mode 100644
index 0000000..f958cdad
Binary files /dev/null and b/_docs/img/install-windows-3.png differ
diff --git a/_docs/img/install-windows-5.png b/_docs/img/install-windows-5.png
new file mode 100644
index 0000000..2a74e41
Binary files /dev/null and b/_docs/img/install-windows-5.png differ
diff --git a/_docs/img/install-windows-6.png b/_docs/img/install-windows-6.png
new file mode 100644
index 0000000..4a77de0
Binary files /dev/null and b/_docs/img/install-windows-6.png differ
diff --git a/_docs/img/query_directories_structure.png b/_docs/img/query_directories_structure.png
new file mode 100644
index 0000000..4f3fb9a
Binary files /dev/null and b/_docs/img/query_directories_structure.png differ
diff --git a/_docs/install/installing-drill-in-embedded-mode/040-installing-drill-on-windows.md b/_docs/install/installing-drill-in-embedded-mode/040-installing-drill-on-windows.md
index 4284d21..ff0af9f 100644
--- a/_docs/install/installing-drill-in-embedded-mode/040-installing-drill-on-windows.md
+++ b/_docs/install/installing-drill-in-embedded-mode/040-installing-drill-on-windows.md
@@ -1,12 +1,50 @@
---
title: "Installing Drill on Windows"
-date: 2018-12-30
+date: 2019-04-05
parent: "Installing Drill in Embedded Mode"
---
-First, check that you [meet the prerequisites]({{site.baseurl}}/docs/embedded-mode-prerequisites), including setting the JAVA_HOME environment variable, and then install Drill. Currently, Drill supports 64-bit Windows only. Complete the following steps to install Drill:
+
+Currently, Drill supports 64-bit Windows only.
+
+##Tools Required
+
+• Download and install [JDK](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html). Select the download for Windows x64.
+• Download and install a utility for unzipping a tar.gz file, such as [7-zip](https://www.7-zip.org/download.html).
+
+## Setting Up Your Windows Environment
+
+Before you download and install Drill on your Windows machine, complete the following procedures:
+
+### Set the JAVA_HOME and PATH environment variables.
+1. Go to System Properties.
+2. On the Advanced Tab, click Environment Variables.![](https://i.imgur.com/ZQ04USE.png)
+3. Click New, and enter JAVA_HOME as the variable name. For the variable value, enter the path to your JDK installation. Note that instead of using Program Files in the path name, use progra~1. This is required because Drill cannot use file paths with spaces.![](https://i.imgur.com/sne3pE2.png)
+4. Click OK to continue.
+5. In the System Variables section, select Path and then click Edit.![](https://i.imgur.com/yZAg2aB.png)
+6. In the edit environment variable window, click New and enter `%JAVA_HOME%\bin`.![](https://i.imgur.com/Bpbjooe.png)
+7. Click OK to continue and exit the System Properties window.
+
+
+### Create Drill UDF directories and change the owner.
+
+Drill has a UDF directories that you must create and assign yourself as owner (or the user that will start Drill) before starting Drill for the first time.
+
+1. Run the command prompt as administrator, and issue the following commands:
+
+ mkdir "%userprofile%\drill"
+ mkdir "%userprofile%\drill\udf"
+ mkdir "%userprofile%\drill\udf\registry"
+ mkdir "%userprofile%\drill\udf\tmp"
+ mkdir "%userprofile%\drill\udf\staging"
+ takeown /R /F "%userprofile%\drill"
+
+2. To verify that you (or the user that will run Drill) owns the directories and files, go to the `"%userprofile%\drill"` directory, right-click on it, and select Properties from the list.![](https://i.imgur.com/z8WRvqK.png)
+3. Complete step 2 for all the directories within drill, including the /udf, /registry, /tmp, and /staging directories.
+
+
+## Download and Install Drill
1. Download the latest version of Apache Drill [here](http://www-us.apache.org/dist/drill/drill-1.15.0/apache-drill-1.15.0.tar.gz).
2. Move the downloaded file to the directory where you want to install Drill.
-3. Unzip the GZ file using a third-party tool. If the tool you use does not unzip the underlying TAR file as well as the GZ file, perform a second unzip to extract the Drill software. The extraction process creates the installation directory containing the Drill software.
-
-Now you can [start Drill]({{site.baseurl}}/docs/starting-drill-on-windows).
+3. Unzip the GZ file using a third-party tool. If the tool you use does not unzip the underlying TAR file as well as the GZ file, perform a second unzip to extract the Drill software. The extraction process creates the installation directory containing the Drill software.
+4. [Start Drill]({{site.baseurl}}/docs/starting-drill-on-windows).
diff --git a/_docs/query-data/060-querying-the-information-schema.md b/_docs/query-data/060-querying-the-information-schema.md
index c81e930..d4e07fe 100644
--- a/_docs/query-data/060-querying-the-information-schema.md
+++ b/_docs/query-data/060-querying-the-information-schema.md
@@ -1,6 +1,6 @@
---
title: "Querying the INFORMATION SCHEMA"
-date: 2018-11-07
+date: 2019-04-05
parent: "Query Data"
---
@@ -249,7 +249,7 @@ Drill can access:
dfs.default CustomerSocialProfile VIEW
----------------------------------------------------------------
-{% include startnote.html %}Currently, Drill only supports querying Drill views; Hive views are not yet supported.{% include endnote.html %}
+{% include startnote.html %}Starting in Drill 1.16, Drill can query Hive views.{% include endnote.html %}
You can run a similar query to identify columns in tables and the data types
of those columns:
diff --git a/_docs/query-data/query-a-file-system/040-querying-directories.md b/_docs/query-data/query-a-file-system/040-querying-directories.md
index 2fbefee..c13b083 100644
--- a/_docs/query-data/query-a-file-system/040-querying-directories.md
+++ b/_docs/query-data/query-a-file-system/040-querying-directories.md
@@ -1,6 +1,6 @@
---
title: "Querying Directories"
-date: 2016-11-21 22:14:46 UTC
+date: 2019-04-05
parent: "Querying a File System"
---
You can store multiple files in a directory and query them as if they were a
@@ -55,39 +55,62 @@ records in all of the files inside the `2013` directory:
+------------+
| 24000 |
+------------+
- 1 row selected (2.607 seconds)
-
-You can also use variables `dir0`, `dir1`, and so on, to refer to
-subdirectories in your workspace path. For example, assume that `bob.logdata`
-is a workspace that points to the `logs` directory, which contains multiple
-subdirectories: `2012`, `2013`, and `2014`. The following query constrains
-files inside the subdirectory named `2013`. The variable `dir0` refers to the
-first level down from logs, `dir1` to the next level, and so on.
-
- 0: jdbc:drill:> USE bob.logdata;
- +------------+-----------------------------------------+
- | ok | summary |
- +------------+-----------------------------------------+
- | true | Default schema changed to 'bob.logdata' |
- +------------+-----------------------------------------+
- 1 row selected (0.305 seconds)
-
- 0: jdbc:drill:> SELECT * FROM logs WHERE dir0='2013' 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'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)
+ 1 row selected (2.607 seconds)
+
+## Querying Partitioned Directories
+
+You can use special variables in Drill to refer to subdirectories in your
+workspace path:
+
+ * dir0
+ * dir1
+ * …
+
+Note that these variables are dynamically determined based on the partitioning
+of the file system. No up-front definitions are required to identify the partitions
+that exist.
+
+The following image provides a visual example of a partitioned directory and a query
+on the directory using variables:
+
+![drill query flow]({{ site.baseurl }}/docs/img/example_query.png)
+
+When you use directory variables in a query, note that the variables are relative to the root directory used in the FROM clause.
+
+For example, let's say you create a workspace within the dfs storage plugin named logs (dfs.logs) that points
+to the /tmp directory in the file system. The /tmp directory contains a /logs directory (/tmp/logs)
+with the same subdirectories shown in the example image above. You can query the data in the /logs directory using variables, as shown in the following examples:
+
+ use dfs.logs;
+ +------+--------------------------------------+
+ | ok | summary |
+ +------+--------------------------------------+
+ | true | Default schema changed to [dfs.logs] |
+ +------+--------------------------------------+
+
+ //The following query constrains files inside the subdirectory named 2013. The variable dir0 refers to the first level down from logs (root directory).
+
+ select * from logs where dir0='2013' limit 3;
+ +------+------+--------------------------------------+----+------------+-----------+-------------------------+--------+----------------+------------------+-----------+-----------+-----------+---------------------+----------+
+ | dir0 | dir1 | registration_dttm | id | first_name | last_name | email | gender | ip_address | cc | country | birthdate | salary | title | comments |
+ +------+------+--------------------------------------+----+------------+-----------+-------------------------+--------+----------------+------------------+-----------+-----------+-----------+---------------------+----------+
+ | 2013 | 1 | \x00*\xE9l\xF2\x19\x00\x00N\x7F%\x00 | 1 | Amanda | Jordan | ajordan0@com.com | Female | 1.197.201.2 | 6759521864920116 | Indonesia | 3/8/1971 | 49756.53 | Internal Auditor | 1E+02 |
+ | 2013 | 1 | \x00^0\xD0\xE17\x00\x00N\x7F%\x00 | 2 | Albert | Freeman | afreeman1@is.gd | Male | 218.111.175.34 | | Canada | 1/16/1968 | 150280.17 | Accountant IV | |
+ | 2013 | 1 | \x00.\xF9"\xCB\x03\x00\x00N\x7F%\x00 | 3 | Evelyn | Morgan | emorgan2@altervista.org | Female | 7.161.136.94 | 6767119071901597 | Russia | 2/1/1960 | 144972.51 | Structural Engineer | |
+ +------+------+--------------------------------------+----+------------+-----------+-------------------------+--------+----------------+------------------+-----------+-----------+-----------+---------------------+----------+
+
+ //The following query constrains files inside the subdirectory named 1. The variable dir0 refers to the first level down from 2013 (the root directory now).
+
+ select * from `logs/2013` where dir0='1' limit 3;
+ +------+--------------------------------------+----+------------+-----------+-------------------------+--------+----------------+------------------+-----------+-----------+-----------+---------------------+----------+
+ | dir0 | registration_dttm | id | first_name | last_name | email | gender | ip_address | cc | country | birthdate | salary | title | comments |
+ +------+--------------------------------------+----+------------+-----------+-------------------------+--------+----------------+------------------+-----------+-----------+-----------+---------------------+----------+
+ | 1 | \x00*\xE9l\xF2\x19\x00\x00N\x7F%\x00 | 1 | Amanda | Jordan | ajordan0@com.com | Female | 1.197.201.2 | 6759521864920116 | Indonesia | 3/8/1971 | 49756.53 | Internal Auditor | 1E+02 |
+ | 1 | \x00^0\xD0\xE17\x00\x00N\x7F%\x00 | 2 | Albert | Freeman | afreeman1@is.gd | Male | 218.111.175.34 | | Canada | 1/16/1968 | 150280.17 | Accountant IV | |
+ | 1 | \x00.\xF9"\xCB\x03\x00\x00N\x7F%\x00 | 3 | Evelyn | Morgan | emorgan2@altervista.org | Female | 7.161.136.94 | 6767119071901597 | Russia | 2/1/1960 | 144972.51 | Structural Engineer | |
+ +------+--------------------------------------+----+------------+-----------+-------------------------+--------+----------------+------------------+-----------+-----------+-----------+---------------------+----------+
+
+
You can use [query directory functions]({{site.baseurl}}/docs/query-directory-functions/) to restrict a query to one of a number of subdirectories and to prevent Drill from scanning all data in directories.