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 0cacafb install drill on windows updates, drill in 10 edits 0cacafb is described below commit 0cacafbd68fec832d865971dae1cff6b546debec Author: Bridget Bevens <bbev...@maprtech.com> AuthorDate: Mon Apr 8 12:28:01 2019 -0700 install drill on windows updates, drill in 10 edits --- _docs/img/install-windows-2-1.png | Bin 0 -> 44607 bytes _docs/img/install-windows-2-2-2.png | Bin 0 -> 62872 bytes _docs/img/install-windows-3-1.png | Bin 0 -> 22135 bytes _docs/img/install-windows-5-1.png | Bin 0 -> 124029 bytes _docs/img/install-windows-6-1.png | Bin 0 -> 107507 bytes .../040-installing-drill-on-windows.md | 18 +++-- .../050-starting-drill-on-windows.md | 53 +++++++++---- _docs/tutorials/020-drill-in-10-minutes.md | 83 +++++++-------------- 8 files changed, 79 insertions(+), 75 deletions(-) diff --git a/_docs/img/install-windows-2-1.png b/_docs/img/install-windows-2-1.png new file mode 100644 index 0000000..7366f77 Binary files /dev/null and b/_docs/img/install-windows-2-1.png differ diff --git a/_docs/img/install-windows-2-2-2.png b/_docs/img/install-windows-2-2-2.png new file mode 100644 index 0000000..ce194d6 Binary files /dev/null and b/_docs/img/install-windows-2-2-2.png differ diff --git a/_docs/img/install-windows-3-1.png b/_docs/img/install-windows-3-1.png new file mode 100644 index 0000000..f958cdad Binary files /dev/null and b/_docs/img/install-windows-3-1.png differ diff --git a/_docs/img/install-windows-5-1.png b/_docs/img/install-windows-5-1.png new file mode 100644 index 0000000..2a74e41 Binary files /dev/null and b/_docs/img/install-windows-5-1.png differ diff --git a/_docs/img/install-windows-6-1.png b/_docs/img/install-windows-6-1.png new file mode 100644 index 0000000..4a77de0 Binary files /dev/null and b/_docs/img/install-windows-6-1.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 ff0af9f..24c83cd 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,6 +1,6 @@ --- title: "Installing Drill on Windows" -date: 2019-04-05 +date: 2019-04-08 parent: "Installing Drill in Embedded Mode" --- @@ -17,17 +17,18 @@ Before you download and install Drill on your Windows machine, complete the foll ### 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) +2. On the Advanced Tab, click Environment Variables. +![](https://i.imgur.com/lpytfmu.png) +3. Click New, and enter JAVA_HOME as the variable name. For the variable value, enter the path to your JDK installation. 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/3CUoNNZ.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) +5. In the System Variables section, select Path and then click Edit.![](https://i.imgur.com/nqv68Nu.png) +6. In the Edit Environment Variable window, click New and enter `%JAVA_HOME%\bin`.![](https://i.imgur.com/2kevwLV.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. +You, or the user that will start Drill, must manually create and own UDF directories. The directories must exist before starting Drill for the first time. 1. Run the command prompt as administrator, and issue the following commands: @@ -38,8 +39,9 @@ Drill has a UDF directories that you must create and assign yourself as owner (o 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. +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/lLLYOMX.png) +3. Verify that you are the owner for all the directories within drill, including the /udf, /registry, /tmp, and /staging directories. If you are not the owner, Edit the permissions. ## Download and Install Drill diff --git a/_docs/install/installing-drill-in-embedded-mode/050-starting-drill-on-windows.md b/_docs/install/installing-drill-in-embedded-mode/050-starting-drill-on-windows.md index 8a21c37..82b3ba9 100644 --- a/_docs/install/installing-drill-in-embedded-mode/050-starting-drill-on-windows.md +++ b/_docs/install/installing-drill-in-embedded-mode/050-starting-drill-on-windows.md @@ -1,23 +1,50 @@ --- title: "Starting Drill on Windows" -date: 2018-11-02 +date: 2019-04-08 parent: "Installing Drill in Embedded Mode" --- -Start the Drill shell using the **sqlline command**. Complete the following steps to launch the Drill shell: +Complete the following steps to launch the Drill: -1. Open Command Prompt. -2. Navigate to the Drill installation folder. -3. Go to the `bin` directory. For example: - ``cd bin`` -4. Type the following command on the command line: - ``sqlline.bat -u "jdbc:drill:zk=local"`` - ![drill install dir]({{ site.baseurl }}/docs/img/sqlline1.png) +1. Open the Windows command prompt. +2. Navigate to the Drill installation folder, for example: +`cd \Users\Bridget Bevens\drill_repo\apache-drill-1.16.0-SNAPSHOT` +3. Go to the `bin` directory, for example: +`cd bin` +4. Enter either of the following commands to start Drill: + - `sqlline.bat -u "jdbc:drill:zk=local"` + - `drill-embedded.bat` (Supported in Drill 1.16 and later.) -The [Drill prompt]({{site.baseurl}}/docs/starting-drill-on-linux-and-mac-os-x/#about-the-drill-prompt) appears. You can [submit queries]({{ site.baseurl }}/docs/drill-in-10-minutes/#query-sample-data) to Drill. +The Drill prompt appears: -You can use the schema option in the **sqlline** command to specify a storage plugin. Specifying the storage plugin when you start up eliminates the need to specify the storage plugin in the query. For example, this command specifies the `dfs` storage plugin: + "A Drill is a terrible thing to waste." + apache drill> -`C:\bin\sqlline sqlline.bat –u "jdbc:drill:zk=local;schema=dfs"` +You can run a test query to verify that Drill is running, for example: + + //Drill's classpath contains sample data, including an employees.json file that you can query. Switch schema to cp, for classpath. + + apache drill>use cp; + +------+--------------------------------+ + | ok | summary | + +------+--------------------------------+ + | true | Default schema changed to [cp] | + +------+--------------------------------+ + + //Query the employee.json file in the classpath. + + apache drill (cp)>SELECT * FROM cp.`employee.json` LIMIT 1; + +-------------+--------------+------------+-----------+-------------+----------------+----------+---------------+------------+-----------------------+---------+---------------+-----------------+----------------+--------+-------------------+ + | employee_id | full_name | first_name | last_name | position_id | position_title | store_id | department_id | birth_date | hire_date | salary | supervisor_id | education_level | marital_status | gender | management_role | + +-------------+--------------+------------+-----------+-------------+----------------+----------+---------------+------------+-----------------------+---------+---------------+-----------------+----------------+--------+-------------------+ + | 1 | Sheri Nowmer | Sheri | Nowmer | 1 | President | 0 | 1 | 1961-08-26 | 1994-12-01 00:00:00.0 | 80000.0 | 0 | Graduate Degree | S | F | Senior Management | + +-------------+--------------+------------+-----------+-------------+----------------+----------+---------------+------------+-----------------------+---------+---------------+-----------------+----------------+--------+-------------------+ + + +For a short tutorial that you can run in Drill, see [Drill in 10 Minutes]({{ site.baseurl }}/docs/drill-in-10-minutes/#query-sample-data). + +Note that you can use the schema option in the **sqlline** command to specify a storage plugin. Specifying the storage plugin when you start up eliminates the need to specify the storage plugin in the query. For example, this command specifies the `dfs` storage plugin: + + sqlline.bat –u "jdbc:drill:zk=local;schema=dfs" If you start Drill on one network, and then want to use Drill on another network, such as your home network, restart Drill. @@ -25,5 +52,5 @@ If you start Drill on one network, and then want to use Drill on another network To exit the Drill shell, issue the following command: -`!quit` + !quit diff --git a/_docs/tutorials/020-drill-in-10-minutes.md b/_docs/tutorials/020-drill-in-10-minutes.md index b33dd8c..ae6ceb3 100644 --- a/_docs/tutorials/020-drill-in-10-minutes.md +++ b/_docs/tutorials/020-drill-in-10-minutes.md @@ -1,6 +1,6 @@ --- title: "Drill in 10 Minutes" -date: 2018-12-30 +date: 2019-04-08 parent: "Tutorials" description: Get started with Drill in 10 minutes or less. --- @@ -16,11 +16,11 @@ You can install Drill to run in embedded mode on a machine running Linux, Mac OS This installation procedure includes how to download the Apache Drill archive file and extract the contents to a directory on your machine. The Apache Drill archive contains sample JSON and Parquet files that you can query immediately. -After installing Drill, you start the Drill shell. The Drill shell is a pure-Java console-based utility for connecting to relational databases and executing SQL commands. Drill follows the SQL:2011 standard with [extensions]({{site.baseurl}}/docs/sql-extensions/) for nested data formats and other capabilities. +After installing Drill, you start the Drill shell. The [Drill shell]({{site.baseurl}}/docs/configuring-the-drill-shell/) is a pure-Java console-based utility for connecting to relational databases and executing SQL commands. Drill follows the SQL:2011 standard with [extensions]({{site.baseurl}}/docs/sql-extensions/) for nested data formats and other capabilities. ## Embedded Mode Installation Prerequisites -You need to meet the following prerequisites to run Drill: +Your machine must meet the following prerequisites to run Drill in embedded mode: * Linux, Mac OS X, and Windows: Oracle JDK [version 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html). * Windows only: @@ -40,7 +40,7 @@ The output looks something like this: Java(TM) SE Runtime Environment (build 1.8.0_7965-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode) -## Install Drill on Linux or Mac OS X +## Installing Drill on Linux or Mac OS X Complete the following steps to install Drill: @@ -54,9 +54,9 @@ Complete the following steps to install Drill: The extraction process creates an installation directory containing the Drill software. -At this point, you can start Drill. +You can start Drill. -## Start Drill on Linux and Mac OS X +### Starting Drill on Linux and Mac OS X Start Drill in embedded mode using the `drill-embedded` command: 1. Navigate to the Drill installation directory. For example: @@ -71,40 +71,20 @@ Start Drill in embedded mode using the `drill-embedded` command: At this point, you can [submit queries]({{site.baseurl}}/docs/drill-in-10-minutes/#query-sample-data) to Drill. -### Install Drill on Windows +## Installing and Starting Drill on Windows -You can install Drill on Windows. First, set the JAVA_HOME environment variable, and then install Drill. Complete the following steps to install Drill: +See [Installing Drill on Windows]({{site.baseurl}}/docs/installing-drill-on-windows/). -1. Download the latest version of Apache Drill [here](http://apache.mirrors.hoobly.com/drill/drill-1.15.0/apache-drill-1.15.0.tar.gz) or from the [Apache Drill mirror site](http://www.apache.org/dyn/closer.cgi/drill/drill-1.15.0/apache-drill-1.15.0.tar.gz). -2. Move the `apache-drill-<version>.tar.gz` file to a directory where you want to install Drill. -3. Unzip the `TAR.GZ` file using a third-party tool. If the tool you use does not unzip the TAR file as well as the `TAR.GZ` file, unzip the `apache-drill-<version>.tar` to extract the Drill software. The extraction process creates the installation directory named apache-drill-<version> containing the Drill software. - -At this point, you can start Drill. - -## Start Drill on Windows -Start Drill by running the sqlline.bat file and typing a connection string, as shown in the following procedure. The `zk=local` in the connection string means the local node is the ZooKeeper node: - -Start the Drill shell using the **sqlline command**. Complete the following steps to launch the Drill shell: - -1. Open Command Prompt. -2. Open the apache-drill-<version> folder. -3. Go to the bin directory. For example: - ``cd bin`` -4. Type the following command on the command line: - ``sqlline.bat -u "jdbc:drill:zk=local"`` - ![drill install dir]({{ site.baseurl }}/docs/img/sqlline1.png) - -The `zk=local` means the local node is the ZooKeeper node. At this point, you can [run queries]({{ site.baseurl }}/docs/drill-in-10-minutes/#query-sample-data). ## Stopping Drill -Issue the following command when you want to exit the Drill shell: +Issue the following command to exit the Drill shell: -`!quit` + !quit ## Query Sample Data -At the root of the Drill installation, a `sample-data` directory includes JSON and +The Drill installation includes a `sample-data` directory with JSON and Parquet files that you can query. The default `dfs` storage plugin configuration represents the local file system on your machine when you install Drill in embedded mode. For more information about storage plugin configuration, refer to [Storage Plugin Registration]({{ site.baseurl }}/docs/connect-a-data-source-introduction). @@ -116,20 +96,18 @@ Use SQL to query the sample `JSON` and `Parquet` files in the `sample-data` dire A sample JSON file, [`employee.json`]({{site.baseurl}}/docs/querying-json-files/), contains fictitious employee data. To view the data in the `employee.json` file, submit the following SQL query to Drill, using the [cp (classpath) storage plugin]({{site.baseurl}}/docs/storage-plugin-registration/) configuration to point to the file. -``0: jdbc:drill:zk=local> SELECT * FROM cp.`employee.json` LIMIT 3;`` - -The query output is: - - +--------------+------------------+-------------+------------+--------------+---------------------+-----------+----------------+-------------+------------------------+----------+----------------+------------------+-----------------+---------+--------------------+ - | employee_id | full_name | first_name | last_name | position_id | position_title | store_id | department_id | birth_date | hire_date | salary | supervisor_id | education_level | marital_status | gender | management_role | - +--------------+------------------+-------------+------------+--------------+---------------------+-----------+----------------+-------------+------------------------+----------+----------------+------------------+-----------------+---------+--------------------+ - | 1 | Sheri Nowmer | Sheri | Nowmer | 1 | President | 0 | 1 | 1961-08-26 | 1994-12-01 00:00:00.0 | 80000.0 | 0 | Graduate Degree | S | F | Senior Management | - | 2 | Derrick Whelply | Derrick | Whelply | 2 | VP Country Manager | 0 | 1 | 1915-07-03 | 1994-12-01 00:00:00.0 | 40000.0 | 1 | Graduate Degree | M | M | Senior Management | - | 4 | Michael Spence | Michael | Spence | 2 | VP Country Manager | 0 | 1 | 1969-06-20 | 1998-01-01 00:00:00.0 | 40000.0 | 1 | Graduate Degree | S | M | Senior Management | - +--------------+------------------+-------------+------------+--------------+---------------------+-----------+----------------+-------------+------------------------+----------+----------------+------------------+-----------------+---------+--------------------+ - 3 rows selected (0.827 seconds) - -### Querying a Parquet File + SELECT * FROM cp.`employee.json` LIMIT 3; + + +--------------+------------------+-------------+------------+--------------+---------------------+-----------+----------------+-------------+------------------------+----------+----------------+------------------+-----------------+---------+--------------------+ + | employee_id | full_name | first_name | last_name | position_id | position_title | store_id | department_id | birth_date | hire_date | salary | supervisor_id | education_level | marital_status | gender | management_role | + +--------------+------------------+-------------+------------+--------------+---------------------+-----------+----------------+-------------+------------------------+----------+----------------+------------------+-----------------+---------+--------------------+ + | 1 | Sheri Nowmer | Sheri | Nowmer | 1 | President | 0 | 1 | 1961-08-26 | 1994-12-01 00:00:00.0 | 80000.0 | 0 | Graduate Degree | S | F | Senior Management | + | 2 | Derrick Whelply | Derrick | Whelply | 2 | VP Country Manager | 0 | 1 | 1915-07-03 | 1994-12-01 00:00:00.0 | 40000.0 | 1 | Graduate Degree | M | M | Senior Management | + | 4 | Michael Spence | Michael | Spence | 2 | VP Country Manager | 0 | 1 | 1969-06-20 | 1998-01-01 00:00:00.0 | 40000.0 | 1 | Graduate Degree | S | M | Senior Management | + +--------------+------------------+-------------+------------+--------------+---------------------+-----------+----------------+-------------+------------------------+----------+----------------+------------------+-----------------+---------+--------------------+ + + +### Querying Parquet Files Query the `region.parquet` and `nation.parquet` files in the `sample-data` directory on your local file system. @@ -142,9 +120,9 @@ systems. To view the data in the `region.parquet` file, use the actual path to your Drill installation to construct this query: -``SELECT * FROM dfs.`<path-to-installation>/apache-drill-<version>/sample-data/region.parquet`;`` + //SELECT * FROM dfs.`<path-to-installation>/apache-drill-<version>/sample-data/region.parquet`; -The query returns the following results: + SELECT * FROM dfs.`Users/drilluser/apache-drill/sample-data/region.parquet`; +--------------+--------------+-----------------------+ | R_REGIONKEY | R_NAME | R_COMMENT | @@ -155,16 +133,13 @@ The query returns the following results: | 3 | EUROPE | ly final courts cajo | | 4 | MIDDLE EAST | uickly special accou | +--------------+--------------+-----------------------+ - 5 rows selected (0.409 seconds) - + #### Nation File The path to the parquet file varies between operating systems. Use the actual path to your Drill installation to construct this query: -``SELECT * FROM dfs.`<path-to-installation>/apache-drill-<version>/sample-data/nation.parquet`;`` - -The query returns the following results: + //SELECT * FROM dfs.`<path-to-installation>/apache-drill-<version>/sample-data/nation.parquet`;`` SELECT * FROM dfs.`Users/drilluser/apache-drill/sample-data/nation.parquet`; +--------------+-----------------+--------------+-----------------------+ @@ -196,11 +171,11 @@ The query returns the following results: | 23 | UNITED KINGDOM | 3 | eans boost carefully | | 24 | UNITED STATES | 1 | y final packages. sl | +--------------+-----------------+--------------+-----------------------+ - 25 rows selected (0.101 seconds) + ## Summary -Apache Drill supports nested data, schema-less execution, and decentralized metadata. At this point, you know how to create a simple query on a JSON or Parquet file. +Apache Drill supports nested data, schema-less execution, and decentralized metadata. You can now use Drill to run simple queries on JSON or Parquet data. ## Next Steps