Skip to content

Commit d476ce5

Browse files
committed
Merge
2 parents e8aba59 + 9d29728 commit d476ce5

14 files changed

+407
-25
lines changed

_data/docs.json

+159-24
Large diffs are not rendered by default.

_docs/img/jreport-addtable.png

93.2 KB
Loading

_docs/img/jreport-catalogbrowser.png

43.9 KB
Loading

_docs/img/jreport-crosstab.png

38 KB
Loading

_docs/img/jreport-crosstab2.png

57.9 KB
Loading

_docs/img/jreport-crosstab3.png

52.5 KB
Loading

_docs/img/jreport-hostsfile.png

117 KB
Loading

_docs/img/jreport-queryeditor.png

39.7 KB
Loading

_docs/img/jreport-quotequalifier.png

69.5 KB
Loading

_docs/img/jreport_setenv.png

61.6 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
title: "Using the JDBC Driver"
3+
parent: "ODBC/JDBC Interfaces"
4+
---
5+
This section explains how to install and use the JDBC driver for Apache Drill. For specific examples of client tool connections to Drill via JDBC, see [Using JDBC with SQuirreL]({{ site.baseurl }}/docs/.../) and [Configuring Spotfire Server]({{ site.baseurl }}/docs/.../).
6+
7+
8+
### Prerequisites
9+
10+
* JRE 7 or JDK 7
11+
* Drill installed either in embedded mode or in distributed mode on one or more nodes in a cluster. Refer to the [Install Drill]({{ site.baseurl }}/docs/install-drill/) documentation for more information.
12+
* The client must be able to resolve the actual hostname of the Drill node(s) with the IP(s). Verify that a DNS entry was created on the client machine for the Drill node(s).
13+
14+
If a DNS entry does not exist, create the entry for the Drill node(s).
15+
16+
* For Windows, create the entry in the %WINDIR%\system32\drivers\etc\hosts file.
17+
* For Linux and Mac OSX, create the entry in /etc/hosts.
18+
<drill-machine-IP> <drill-machine-hostname>
19+
Example: `127.0.1.1 maprdemo`
20+
21+
22+
----------
23+
24+
### Getting the Drill JDBC Driver
25+
26+
The Drill JDBC Driver `JAR` file must exist in a directory on a client machine so you can configure the driver for the application or third-party tool that you intend to use. You can obtain the driver in two different ways:
27+
28+
1. Copy the `drill-jdbc-all` JAR file from the following Drill installation directory on a node where Drill is installed to a directory on your client
29+
machine:
30+
31+
<drill_installation_directory>/jars/jdbc-driver/drill-jdbc-all-<version>.jar
32+
33+
For example: drill1.0/jdbc-driver/drill-jdbc-all-1.0.0-mapr-r1.jar
34+
35+
2. Download the following tar file to a location on your client machine: [apache-
36+
drill-1.0.0.tar.gz](http://apache.osuosl.org/drill/drill-1.0.0/apache-drill-1.0.0-src.tar.gz) and extract the file. You may need to use a decompression utility, such as [7-zip](http://www.7-zip.org/). The driver is extracted to the following directory:
37+
38+
<drill-home>\apache-drill-<version>\jars\jdbc-driver\drill-jdbc-all-<version>.jar
39+
40+
Mac vs windows paths here....
41+
42+
On a MapR cluster, the JDBC driver is installed here: `/opt/mapr/drill/drill-1.0.0/jars/jdbc-driver/`
43+
44+
----------
45+
46+
### JDBC Driver URLs
47+
48+
To configure a JDBC application, users have to:
49+
50+
1. Put the Drill JDBC jar file on the class path.
51+
2. Use a valid Drill JDBC URL.
52+
3. Configure tools or application code with the name of the Drill driver class.
53+
54+
The driver URLs that you use to create JDBC connection strings must be formed as stated in the following sections.
55+
56+
57+
#### Driver Class Name
58+
59+
The class name for the JDBC driver is `org.apache.drill.jdbc.Driver`
60+
61+
#### URL Syntax
62+
63+
The form of the driver's JDBC URLs is as follows. The URL consists of some required and some optional parameters.
64+
65+
A Drill JDBC URL must start with: `"{{jdbc:drill:}}"`
66+
67+
#### URL Examples
68+
69+
`jdbc:drill:zk=maprdemo:5181`
70+
71+
where `zk=maprdemo:5181` defines the ZooKeeper quorum.
72+
73+
`jdbc:drill:zk=10.10.100.56:5181/drill/drillbits1;schema=hive`
74+
75+
where the ZooKeeper node IP address is provided as well as the Drill directory in ZK and the cluster ID?
76+
77+
`jdbc:drill:zk=10.10.100.30:5181,10.10.100.31:5181,10.10.100.32:5181/drill/drillbits1;schema=hive`
78+
79+
<li>Including a default schema is optional.</li>
80+
<li>The ZooKeeper port is 2181. In a MapR cluster, the ZooKeeper port is 5181.</li>
81+
<li>The Drill directory stored in ZooKeeper is <code>/drill</code>.</li>
82+
<li>The Drill default cluster ID is<code> drillbits1</code>.</li>
83+
84+
---------
85+
86+
### JDBC Driver Configuration Options
87+
88+
To control the behavior of the Drill JDBC driver, you can append the following configuration options to the JDBC URL:
89+
90+
<config options>
91+
92+
93+
----------
94+
95+
96+
### Related Documentation
97+
98+
When you have connected to Drill through the JDBC Driver, you can issue queries from the JDBC application or client. Start by running
99+
a test query on some sample data included in the Drill installation.
100+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
title: "Using the JDBC Driver"
3+
parent: "ODBC/JDBC Interfaces"
4+
---
5+
This section explains how to install and use the JDBC driver for Apache Drill. For specific examples of client tool connections to Drill via JDBC, see [Using JDBC with SQuirreL]({{ site.baseurl }}/docs/.../) and [Configuring Spotfire Server]({{ site.baseurl }}/docs/.../).
6+
7+
8+
### Prerequisites
9+
10+
* JRE 7 or JDK 7
11+
* Drill installed either in embedded mode or in distributed mode on one or more nodes in a cluster. Refer to the [Install Drill]({{ site.baseurl }}/docs/install-drill/) documentation for more information.
12+
* The client must be able to resolve the actual hostname of the Drill node(s) with the IP(s). Verify that a DNS entry was created on the client machine for the Drill node(s). If a DNS entry does not exist, create the entry for the Drill node(s).
13+
14+
* For Windows, create the entry in the %WINDIR%\system32\drivers\etc\hosts file.
15+
* For Linux and Mac OSX, create the entry in /etc/hosts.
16+
<drill-machine-IP> <drill-machine-hostname>
17+
For example: `127.0.1.1 maprdemo`
18+
19+
20+
----------
21+
22+
### Getting the Drill JDBC Driver
23+
24+
The Drill JDBC Driver `JAR` file must exist in a directory on a client machine so you can configure the driver for the application or third-party tool that you intend to use. You can obtain the driver in two different ways:
25+
26+
1. Copy the `drill-jdbc-all` JAR file from the following Drill installation directory on a node where Drill is installed to a directory on your client machine:
27+
28+
<drill_installation_directory>/jars/jdbc-driver/drill-jdbc-all-<version>.jar
29+
30+
For example, on a MapR cluster: `/opt/mapr/drill/drill-1.0.0/jars/jdbc-driver/drill-jdbc-all-1.0.0-mapr-r1.jar`
31+
32+
2. Download the following tar file to a location on your client machine: [apache-
33+
drill-1.0.0.tar.gz](http://apache.osuosl.org/drill/drill-1.0.0/apache-drill-1.0.0-src.tar.gz) and extract the file. You may need to use a decompression utility, such as [7-zip](http://www.7-zip.org/). The driver is extracted to the following directory:
34+
35+
<drill-home>\apache-drill-\<version>\jars\jdbc-driver\drill-jdbc-all-<version>.jar
36+
37+
----------
38+
39+
### Configuring a Driver Application or Client
40+
41+
To configure a JDBC application, users have to:
42+
43+
1. Put the Drill JDBC jar file on the class path.
44+
2. Use a valid Drill JDBC URL.
45+
3. Configure tools or application code with the name of the Drill driver class.
46+
47+
Most client tools provide a UI where you can enter all of the required connection information, including the Driver location, connection URL, and driver class name.
48+
49+
### JDBC Driver URLs
50+
51+
The driver URLs that you use to create JDBC connection strings must be formed as follows:
52+
53+
`jdbc:drill:zk=<zookeeper_quorum>:<port>/<drill_directory_in_zookeeper>/<cluster_ID>;schema=<schema_to_use_as_default>`
54+
55+
Any Drill JDBC URL must start with: `jdbc:drill`.
56+
57+
**ZooKeeper Quorum**
58+
59+
To connect to a cluster, specify the ZooKeeper quorum as a list of hostnames or IP addresses.
60+
61+
**ZooKeeper Port Number**
62+
63+
The default ZooKeeper port is 2181. On a MapR cluster, the ZooKeeper port is 5181.
64+
65+
**Drill Directory in ZooKeeper**
66+
67+
The name of the Drill directory stored in ZooKeeper is `/drill`.
68+
69+
**Cluster ID**
70+
71+
The Drill default cluster ID is <code>drillbits1</code>.
72+
73+
On a MapR cluster, check the following file for the cluster ID:
74+
75+
`/opt/mapr/drill/drill-1.0.0/conf/drill-override.conf`
76+
77+
For example:
78+
79+
`...
80+
drill.exec: {
81+
cluster-id: "docs41cluster-drillbits",
82+
zk.connect: "centos23.lab:5181,centos28.lab:5181,centos29.lab:5181"
83+
}
84+
...`
85+
86+
**Schema**
87+
88+
Optionally, include the default schema for the JDBC connection. For example:
89+
90+
`schema=hive`
91+
92+
93+
### URL Examples
94+
95+
**Single-Node Installation**
96+
97+
`jdbc:drill:zk=maprdemo:5181`
98+
99+
`jdbc:drill:zk=centos23.lab:5181/drill/docs41cluster-drillbits`
100+
101+
`jdbc:drill:zk=10.10.100.56:5181/drill/drillbits1;schema=hive`
102+
103+
**Cluster Installation**
104+
105+
`jdbc:drill:zk=10.10.100.30:5181,10.10.100.31:5181,10.10.100.32:5181/drill/drillbits1;schema=hive`
106+
107+
---------
108+
109+
### Driver Class Name
110+
111+
The class name for the JDBC driver is `org.apache.drill.jdbc.Driver`
112+
113+
-----------

_docs/odbc-jdbc-interfaces/using-drill-with-bi-tools/080-configuring-jreport.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: "Configuring JReport with Drill"
3+
parent: "Using Drill with BI Tools"
4+
---
5+
6+
JReport is an embeddable BI solution that empowers users to analyze data and create reports and dashboards. JReport accesses data from Hadoop systems, such as the MapR Distribution through Apache Drill, as well as other big data and transactional data sources. By visualizing data through Drill, users can perform their own reporting and data discovery for agile, on-the-fly decision-making.You can use JReport 13.1 and the the Apache Drill JDBC Driver to easily extract data from the MapR Distribution and visulaize it, creating reports and dashboards that you can embed into your own applications.
7+
Complete the following simple steps to use Apache Drill with JReport:
8+
1. Install the Drill JDBC Driver with JReport.2. Create a new JReport Catalog to manage the Drill connection.3. Use JReport Designer to query the data and create a report.----------
9+
10+
### Step 1: Install the Drill JDBC Driver with JReport
11+
12+
Drill provides standard JDBC connectivity to easily integrate with JReport. JReport 13.1 requires Drill 1.0 or later.
13+
For general instructions on installing the Drill JDBC driver, see [Using JDBC]({{ site.baseurl }}/docs/using-jdbc/).1. Locate the JDBC driver in the Drill installation directory on any node where Drill is installed on the cluster:
14+
<drill-home>/jars/jdbc-driver/drill-jdbc-all-<drill-version>.jar For example:
15+
/opt/mapr/drill/drill-1.0.0/jars/jdbc-driver/drill-jdbc-all-1.0.0.jar 2. Copy the Drill JDBC driver into the JReport `lib` folder:
16+
%REPORTHOME%\lib\
17+
For example, on Windows, copy the Drill JDBC driver jar file into:
18+
19+
C:\JReport\Designer\lib\drill-jdbc-all-1.0.0.jar 3. Add the location of the JAR file to the JReport CLASSPATH variable. On Windows, edit the `C:\JReport\Designer\bin\setenv.bat` file:
20+
![drill query flow]({{ site.baseurl }}/docs/img/jreport_setenv.png)4. Verify that the JReport system can resolve the hostnames of the ZooKeeper nodes of the Drill cluster. You can do this by configuring DNS for all of the systems. Alternatively, you can edit the hosts file on the JReport system to include the hostnames and IP addresses of all the ZooKeeper nodes used with the Drill cluster. For Linux systems, the hosts file is located at `/etc/hosts`. For Windows systems, the hosts file is located at `%WINDIR%\system32\drivers\etc\hosts` Here is an example of a Windows hosts file: ![drill query flow]({{ site.baseurl }}/docs/img/jreport-hostsfile.png)
21+
22+
----------
23+
24+
### Step 2: Create a New JReport Catalog to Manage the Drill Connection
25+
26+
1. Click Create **New -> Catalog…**2. Provide a catalog file name and click **…** to choose the file-saving location.3. Click **View -> Catalog Browser**.4. Right-click **Data Source 1** and select **Add JDBC Connection**.5. Fill in the **Driver**, **URL**, **User**, and **Password** fields. ![drill query flow]({{ site.baseurl }}/docs/img/jreport-catalogbrowser.png)6. Click **Options** and select the **Qualifier** tab. 7. In the **Quote Qualifier** section, choose **User Defined** and change the quote character from “ to ` (backtick). ![drill query flow]({{ site.baseurl }}/docs/img/jreport-quotequalifier.png)8. Click **OK**. JReport will verify the connection and save all information.9. Add tables and views to the JReport catalog by right-clicking the connection node and choosing **Add Table**. Now you can browse the schemas and add specific tables that you want to make available for building queries. ![drill query flow]({{ site.baseurl }}/docs/img/jreport-addtable.png)10. Click **Done** when you have added all the tables you need.
27+
28+
29+
### Step 3: Use JReport Designer
30+
31+
1. In the Catalog Browser, right-click **Queries** and select **Add Query…**2. Define a JReport query by using the Query Editor. You can also import your own SQL statements. ![drill query flow]({{ site.baseurl }}/docs/img/jreport-queryeditor.png)3. Click **OK** to close the Query Editor, and click the **Save Catalog** button to save your progress to the catalog file.
32+
**Note**: If the report returns errors, you may need to edit the query and add the schema in front of the table name: `select column from schema.table_name` You can do this by clicking the **SQL** button on the Query Editor.5. Use JReport Designer to query the data and create a report. ![drill query flow]({{ site.baseurl }}/docs/img/jreport-crosstab.png)
33+
![drill query flow]({{ site.baseurl }}/docs/img/jreport-crosstab2.png)
34+
![drill query flow]({{ site.baseurl }}/docs/img/jreport-crosstab3.png)

team.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ We welcome contributions to the project. If you're interested in contributing, t
1010

1111
| Name | Alias (email is &lt;alias&gt;@apache.org) |
1212
|------|-------|
13-
| **Jacques Nadeau (PMC Chair and VP Apache Drill)** | **jacques** |
13+
| Jacques Nadeau | jacques |
1414
| Tomer Shiran | tshiran |
1515
| Ted Dunning | tdunning |
1616
| Jason Frantz | jason |

0 commit comments

Comments
 (0)