JReport doc

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

Branch: refs/heads/gh-pages
Commit: 81820904d529f35938817a18e347af99689bdcdd
Parents: e8aba59
Author: Bob Rumsby <[email protected]>
Authored: Wed Jun 10 15:57:42 2015 -0700
Committer: Kristine Hahn <[email protected]>
Committed: Fri Jun 19 14:43:21 2015 -0700

----------------------------------------------------------------------
 _data/docs.json                                 | 108 ++++++++++++++++---
 _docs/img/jreport-addtable.png                  | Bin 0 -> 95442 bytes
 _docs/img/jreport-catalogbrowser.png            | Bin 0 -> 44988 bytes
 _docs/img/jreport-crosstab.png                  | Bin 0 -> 38885 bytes
 _docs/img/jreport-crosstab2.png                 | Bin 0 -> 59255 bytes
 _docs/img/jreport-crosstab3.png                 | Bin 0 -> 53791 bytes
 _docs/img/jreport-hostsfile.png                 | Bin 0 -> 119798 bytes
 _docs/img/jreport-queryeditor.png               | Bin 0 -> 40606 bytes
 _docs/img/jreport-quotequalifier.png            | Bin 0 -> 71219 bytes
 _docs/img/jreport_setenv.png                    | Bin 0 -> 63047 bytes
 .../odbc-jdbc-interfaces/015-using-jdbc-driver  | 100 +++++++++++++++++
 .../080-configuring-jreport.md                  |  34 ++++++
 12 files changed, 230 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/81820904/_data/docs.json
----------------------------------------------------------------------
diff --git a/_data/docs.json b/_data/docs.json
index 491fddc..204c4fa 100644
--- a/_data/docs.json
+++ b/_data/docs.json
@@ -1124,6 +1124,27 @@
             "title": "Configuring Drill Memory", 
             "url": "/docs/configuring-drill-memory/"
         }, 
+        "Configuring JReport with Drill": {
+            "breadcrumbs": [
+                {
+                    "title": "Using Drill with BI Tools", 
+                    "url": "/docs/using-drill-with-bi-tools/"
+                }, 
+                {
+                    "title": "ODBC/JDBC Interfaces", 
+                    "url": "/docs/odbc-jdbc-interfaces/"
+                }
+            ], 
+            "children": [], 
+            "next_title": "Query Data", 
+            "next_url": "/docs/query-data/", 
+            "parent": "Using Drill with BI Tools", 
+            "previous_title": "Using Apache Drill with Tableau 9 Server", 
+            "previous_url": "/docs/using-apache-drill-with-tableau-9-server/", 
+            "relative_path": 
"_docs/odbc-jdbc-interfaces/using-drill-with-bi-tools/080-configuring-jreport.md",
 
+            "title": "Configuring JReport with Drill", 
+            "url": "/docs/configuring-jreport-with-drill/"
+        }, 
         "Configuring Multitenant Resources": {
             "breadcrumbs": [
                 {
@@ -5356,14 +5377,35 @@
                                 }
                             ], 
                             "children": [], 
-                            "next_title": "Query Data", 
-                            "next_url": "/docs/query-data/", 
+                            "next_title": "Configuring JReport with Drill", 
+                            "next_url": 
"/docs/configuring-jreport-with-drill/", 
                             "parent": "Using Drill with BI Tools", 
                             "previous_title": "Using Apache Drill with Tableau 
9 Desktop", 
                             "previous_url": 
"/docs/using-apache-drill-with-tableau-9-desktop/", 
                             "relative_path": 
"_docs/odbc-jdbc-interfaces/using-drill-with-bi-tools/070-using-apache-drill-with-tableau-9-server.md",
 
                             "title": "Using Apache Drill with Tableau 9 
Server", 
                             "url": 
"/docs/using-apache-drill-with-tableau-9-server/"
+                        }, 
+                        {
+                            "breadcrumbs": [
+                                {
+                                    "title": "Using Drill with BI Tools", 
+                                    "url": "/docs/using-drill-with-bi-tools/"
+                                }, 
+                                {
+                                    "title": "ODBC/JDBC Interfaces", 
+                                    "url": "/docs/odbc-jdbc-interfaces/"
+                                }
+                            ], 
+                            "children": [], 
+                            "next_title": "Query Data", 
+                            "next_url": "/docs/query-data/", 
+                            "parent": "Using Drill with BI Tools", 
+                            "previous_title": "Using Apache Drill with Tableau 
9 Server", 
+                            "previous_url": 
"/docs/using-apache-drill-with-tableau-9-server/", 
+                            "relative_path": 
"_docs/odbc-jdbc-interfaces/using-drill-with-bi-tools/080-configuring-jreport.md",
 
+                            "title": "Configuring JReport with Drill", 
+                            "url": "/docs/configuring-jreport-with-drill/"
                         }
                     ], 
                     "next_title": "Using Drill with BI Tools Introduction", 
@@ -6457,8 +6499,8 @@
             "next_title": "Query Data Introduction", 
             "next_url": "/docs/query-data-introduction/", 
             "parent": "", 
-            "previous_title": "Using Apache Drill with Tableau 9 Server", 
-            "previous_url": "/docs/using-apache-drill-with-tableau-9-server/", 
+            "previous_title": "Configuring JReport with Drill", 
+            "previous_url": "/docs/configuring-jreport-with-drill/", 
             "relative_path": "_docs/070-query-data.md", 
             "title": "Query Data", 
             "url": "/docs/query-data/"
@@ -10287,8 +10329,8 @@
                 }
             ], 
             "children": [], 
-            "next_title": "Query Data", 
-            "next_url": "/docs/query-data/", 
+            "next_title": "Configuring JReport with Drill", 
+            "next_url": "/docs/configuring-jreport-with-drill/", 
             "parent": "Using Drill with BI Tools", 
             "previous_title": "Using Apache Drill with Tableau 9 Desktop", 
             "previous_url": 
"/docs/using-apache-drill-with-tableau-9-desktop/", 
@@ -10519,14 +10561,35 @@
                         }
                     ], 
                     "children": [], 
-                    "next_title": "Query Data", 
-                    "next_url": "/docs/query-data/", 
+                    "next_title": "Configuring JReport with Drill", 
+                    "next_url": "/docs/configuring-jreport-with-drill/", 
                     "parent": "Using Drill with BI Tools", 
                     "previous_title": "Using Apache Drill with Tableau 9 
Desktop", 
                     "previous_url": 
"/docs/using-apache-drill-with-tableau-9-desktop/", 
                     "relative_path": 
"_docs/odbc-jdbc-interfaces/using-drill-with-bi-tools/070-using-apache-drill-with-tableau-9-server.md",
 
                     "title": "Using Apache Drill with Tableau 9 Server", 
                     "url": "/docs/using-apache-drill-with-tableau-9-server/"
+                }, 
+                {
+                    "breadcrumbs": [
+                        {
+                            "title": "Using Drill with BI Tools", 
+                            "url": "/docs/using-drill-with-bi-tools/"
+                        }, 
+                        {
+                            "title": "ODBC/JDBC Interfaces", 
+                            "url": "/docs/odbc-jdbc-interfaces/"
+                        }
+                    ], 
+                    "children": [], 
+                    "next_title": "Query Data", 
+                    "next_url": "/docs/query-data/", 
+                    "parent": "Using Drill with BI Tools", 
+                    "previous_title": "Using Apache Drill with Tableau 9 
Server", 
+                    "previous_url": 
"/docs/using-apache-drill-with-tableau-9-server/", 
+                    "relative_path": 
"_docs/odbc-jdbc-interfaces/using-drill-with-bi-tools/080-configuring-jreport.md",
 
+                    "title": "Configuring JReport with Drill", 
+                    "url": "/docs/configuring-jreport-with-drill/"
                 }
             ], 
             "next_title": "Using Drill with BI Tools Introduction", 
@@ -12392,14 +12455,35 @@
                                 }
                             ], 
                             "children": [], 
-                            "next_title": "Query Data", 
-                            "next_url": "/docs/query-data/", 
+                            "next_title": "Configuring JReport with Drill", 
+                            "next_url": 
"/docs/configuring-jreport-with-drill/", 
                             "parent": "Using Drill with BI Tools", 
                             "previous_title": "Using Apache Drill with Tableau 
9 Desktop", 
                             "previous_url": 
"/docs/using-apache-drill-with-tableau-9-desktop/", 
                             "relative_path": 
"_docs/odbc-jdbc-interfaces/using-drill-with-bi-tools/070-using-apache-drill-with-tableau-9-server.md",
 
                             "title": "Using Apache Drill with Tableau 9 
Server", 
                             "url": 
"/docs/using-apache-drill-with-tableau-9-server/"
+                        }, 
+                        {
+                            "breadcrumbs": [
+                                {
+                                    "title": "Using Drill with BI Tools", 
+                                    "url": "/docs/using-drill-with-bi-tools/"
+                                }, 
+                                {
+                                    "title": "ODBC/JDBC Interfaces", 
+                                    "url": "/docs/odbc-jdbc-interfaces/"
+                                }
+                            ], 
+                            "children": [], 
+                            "next_title": "Query Data", 
+                            "next_url": "/docs/query-data/", 
+                            "parent": "Using Drill with BI Tools", 
+                            "previous_title": "Using Apache Drill with Tableau 
9 Server", 
+                            "previous_url": 
"/docs/using-apache-drill-with-tableau-9-server/", 
+                            "relative_path": 
"_docs/odbc-jdbc-interfaces/using-drill-with-bi-tools/080-configuring-jreport.md",
 
+                            "title": "Configuring JReport with Drill", 
+                            "url": "/docs/configuring-jreport-with-drill/"
                         }
                     ], 
                     "next_title": "Using Drill with BI Tools Introduction", 
@@ -12797,8 +12881,8 @@
             "next_title": "Query Data Introduction", 
             "next_url": "/docs/query-data-introduction/", 
             "parent": "", 
-            "previous_title": "Using Apache Drill with Tableau 9 Server", 
-            "previous_url": "/docs/using-apache-drill-with-tableau-9-server/", 
+            "previous_title": "Configuring JReport with Drill", 
+            "previous_url": "/docs/configuring-jreport-with-drill/", 
             "relative_path": "_docs/070-query-data.md", 
             "title": "Query Data", 
             "url": "/docs/query-data/"

http://git-wip-us.apache.org/repos/asf/drill/blob/81820904/_docs/img/jreport-addtable.png
----------------------------------------------------------------------
diff --git a/_docs/img/jreport-addtable.png b/_docs/img/jreport-addtable.png
new file mode 100644
index 0000000..db5a464
Binary files /dev/null and b/_docs/img/jreport-addtable.png differ

http://git-wip-us.apache.org/repos/asf/drill/blob/81820904/_docs/img/jreport-catalogbrowser.png
----------------------------------------------------------------------
diff --git a/_docs/img/jreport-catalogbrowser.png 
b/_docs/img/jreport-catalogbrowser.png
new file mode 100644
index 0000000..25a1d3a
Binary files /dev/null and b/_docs/img/jreport-catalogbrowser.png differ

http://git-wip-us.apache.org/repos/asf/drill/blob/81820904/_docs/img/jreport-crosstab.png
----------------------------------------------------------------------
diff --git a/_docs/img/jreport-crosstab.png b/_docs/img/jreport-crosstab.png
new file mode 100644
index 0000000..21cb550
Binary files /dev/null and b/_docs/img/jreport-crosstab.png differ

http://git-wip-us.apache.org/repos/asf/drill/blob/81820904/_docs/img/jreport-crosstab2.png
----------------------------------------------------------------------
diff --git a/_docs/img/jreport-crosstab2.png b/_docs/img/jreport-crosstab2.png
new file mode 100644
index 0000000..427198c
Binary files /dev/null and b/_docs/img/jreport-crosstab2.png differ

http://git-wip-us.apache.org/repos/asf/drill/blob/81820904/_docs/img/jreport-crosstab3.png
----------------------------------------------------------------------
diff --git a/_docs/img/jreport-crosstab3.png b/_docs/img/jreport-crosstab3.png
new file mode 100644
index 0000000..46d71ad
Binary files /dev/null and b/_docs/img/jreport-crosstab3.png differ

http://git-wip-us.apache.org/repos/asf/drill/blob/81820904/_docs/img/jreport-hostsfile.png
----------------------------------------------------------------------
diff --git a/_docs/img/jreport-hostsfile.png b/_docs/img/jreport-hostsfile.png
new file mode 100644
index 0000000..a6486bd
Binary files /dev/null and b/_docs/img/jreport-hostsfile.png differ

http://git-wip-us.apache.org/repos/asf/drill/blob/81820904/_docs/img/jreport-queryeditor.png
----------------------------------------------------------------------
diff --git a/_docs/img/jreport-queryeditor.png 
b/_docs/img/jreport-queryeditor.png
new file mode 100644
index 0000000..c0af6f9
Binary files /dev/null and b/_docs/img/jreport-queryeditor.png differ

http://git-wip-us.apache.org/repos/asf/drill/blob/81820904/_docs/img/jreport-quotequalifier.png
----------------------------------------------------------------------
diff --git a/_docs/img/jreport-quotequalifier.png 
b/_docs/img/jreport-quotequalifier.png
new file mode 100644
index 0000000..3760011
Binary files /dev/null and b/_docs/img/jreport-quotequalifier.png differ

http://git-wip-us.apache.org/repos/asf/drill/blob/81820904/_docs/img/jreport_setenv.png
----------------------------------------------------------------------
diff --git a/_docs/img/jreport_setenv.png b/_docs/img/jreport_setenv.png
new file mode 100644
index 0000000..9fbe143
Binary files /dev/null and b/_docs/img/jreport_setenv.png differ

http://git-wip-us.apache.org/repos/asf/drill/blob/81820904/_docs/odbc-jdbc-interfaces/015-using-jdbc-driver
----------------------------------------------------------------------
diff --git a/_docs/odbc-jdbc-interfaces/015-using-jdbc-driver 
b/_docs/odbc-jdbc-interfaces/015-using-jdbc-driver
new file mode 100755
index 0000000..b2339fe
--- /dev/null
+++ b/_docs/odbc-jdbc-interfaces/015-using-jdbc-driver
@@ -0,0 +1,100 @@
+---
+title: "Using the JDBC Driver"
+parent: "ODBC/JDBC Interfaces"
+---
+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/.../).
+
+
+### Prerequisites
+
+  * JRE 7 or JDK 7
+  * 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.
+  * 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).
+
+    * For Windows, create the entry in the %WINDIR%\system32\drivers\etc\hosts 
file.
+    * For Linux and Mac OSX, create the entry in /etc/hosts.  
+<drill-machine-IP> <drill-machine-hostname>
+    Example: `127.0.1.1 maprdemo`
+
+
+----------
+
+### Getting the Drill JDBC Driver
+
+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:
+
+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:
+
+    
<drill_installation_directory>/jars/jdbc-driver/drill-jdbc-all-<version>.jar
+    
+    For example: drill1.0/jdbc-driver/drill-jdbc-all-1.0.0-mapr-r1.jar
+
+2. Download the following tar file to a location on your client machine: 
[apache-
+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:
+
+    
<drill-home>\apache-drill-<version>\jars\jdbc-driver\drill-jdbc-all-<version>.jar
+
+Mac vs windows paths here....
+
+On a MapR cluster, the JDBC driver is installed here: 
`/opt/mapr/drill/drill-1.0.0/jars/jdbc-driver/`
+
+----------
+
+### JDBC Driver URLs
+
+To configure a JDBC application, users have to:
+
+1. Put the Drill JDBC jar file on the class path.
+2. Use a valid Drill JDBC URL.
+3. Configure tools or application code with the name of the Drill driver class.
+
+The driver URLs that you use to create JDBC connection strings must be formed 
as stated in the following sections. 
+
+
+#### Driver Class Name
+
+The class name for the JDBC driver is `org.apache.drill.jdbc.Driver`
+
+#### URL Syntax
+
+The form of the driver's JDBC URLs is as follows. The URL consists of some 
required and some optional parameters. 
+
+A Drill JDBC URL must start with: `"{{jdbc:drill:}}"`
+
+#### URL Examples
+
+`jdbc:drill:zk=maprdemo:5181`
+
+where `zk=maprdemo:5181` defines the ZooKeeper quorum.
+
+`jdbc:drill:zk=10.10.100.56:5181/drill/drillbits1;schema=hive`
+
+where the ZooKeeper node IP address is provided as well as the Drill directory 
in ZK and the cluster ID?
+
+`jdbc:drill:zk=10.10.100.30:5181,10.10.100.31:5181,10.10.100.32:5181/drill/drillbits1;schema=hive`
+
+<li>Including a default schema is optional.</li>
+<li>The ZooKeeper port is 2181. In a MapR cluster, the ZooKeeper port is 
5181.</li>
+<li>The Drill directory stored in ZooKeeper is <code>/drill</code>.</li>
+<li>The Drill default cluster ID is<code> drillbits1</code>.</li>
+
+---------
+
+### JDBC Driver Configuration Options
+
+To control the behavior of the Drill JDBC driver, you can append the following 
configuration options to the JDBC URL:
+
+<config options>
+
+
+----------
+
+
+### Related Documentation
+
+When you have connected to Drill through the JDBC Driver, you can issue 
queries from the JDBC application or client. Start by running
+a test query on some sample data included in the Drill installation.
+

http://git-wip-us.apache.org/repos/asf/drill/blob/81820904/_docs/odbc-jdbc-interfaces/using-drill-with-bi-tools/080-configuring-jreport.md
----------------------------------------------------------------------
diff --git 
a/_docs/odbc-jdbc-interfaces/using-drill-with-bi-tools/080-configuring-jreport.md
 
b/_docs/odbc-jdbc-interfaces/using-drill-with-bi-tools/080-configuring-jreport.md
new file mode 100644
index 0000000..1782ad1
--- /dev/null
+++ 
b/_docs/odbc-jdbc-interfaces/using-drill-with-bi-tools/080-configuring-jreport.md
@@ -0,0 +1,34 @@
+---
+title: "Configuring JReport with Drill"
+parent: "Using Drill with BI Tools"
+---
+
+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.
+
Complete the following simple steps to use Apache Drill with JReport:
+

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.

----------
+
+### Step 1: Install the Drill JDBC Driver with JReport
+
+Drill provides standard JDBC connectivity to easily integrate with JReport. 
JReport 13.1 requires Drill 1.0 or later.
+
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: 
+
        <drill-home>/jars/jdbc-driver/drill-jdbc-all-<drill-version>.jar 
   For example:
+
        /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:
+
        %REPORTHOME%\lib\
+   For example, on Windows, copy the Drill JDBC driver jar file into:
+   
+        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:
+
    ![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)
+
+----------
+
+### Step 2: Create a New JReport Catalog to Manage the Drill Connection
+
+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. 
+
+
+### Step 3: Use JReport Designer
+
+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. 
+
    **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)
+
    ![drill query flow]({{ site.baseurl }}/docs/img/jreport-crosstab2.png)
+
    ![drill query flow]({{ site.baseurl }}/docs/img/jreport-crosstab3.png)
\ No newline at end of file

Reply via email to