Repository: incubator-zeppelin Updated Branches: refs/heads/master 719134437 -> e4ab6043f
[DOCS][JDBC] Guide user to add jdbc driver jar file via GUI interpreter menu ### What is this PR for? Update jdbc documentation to let user load dependencies via GUI interpreter menu instead of editing `zeppelin-daemon.sh` ### What type of PR is it? Documentation ### Is there a relevant Jira issue? No ### Screenshots (if appropriate) **Before**   **After**   ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Mina Lee <[email protected]> Closes #717 from minahlee/update/jdbcDoc and squashes the following commits: 38ef52a [Mina Lee] Add image files 4b73365 [Mina Lee] * Guide user to use dependencies to add jdbc driver instead of editing `zeppelin-daemeon.sh` file * Fix some grammar Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/e4ab6043 Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/e4ab6043 Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/e4ab6043 Branch: refs/heads/master Commit: e4ab6043f34db271514344d74f9c8b3899b1eb53 Parents: 7191344 Author: Mina Lee <[email protected]> Authored: Mon Feb 15 18:13:04 2016 +0900 Committer: Lee moon soo <[email protected]> Committed: Sat Feb 20 08:53:59 2016 -0800 ---------------------------------------------------------------------- .../docs-img/jdbc-multi-connection-setting.png | Bin 0 -> 105980 bytes .../docs-img/jdbc-simple-connection-setting.png | Bin 0 -> 81943 bytes docs/interpreter/jdbc.md | 34 ++++++++++--------- 3 files changed, 18 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/e4ab6043/docs/assets/themes/zeppelin/img/docs-img/jdbc-multi-connection-setting.png ---------------------------------------------------------------------- diff --git a/docs/assets/themes/zeppelin/img/docs-img/jdbc-multi-connection-setting.png b/docs/assets/themes/zeppelin/img/docs-img/jdbc-multi-connection-setting.png new file mode 100644 index 0000000..4b4d7b5 Binary files /dev/null and b/docs/assets/themes/zeppelin/img/docs-img/jdbc-multi-connection-setting.png differ http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/e4ab6043/docs/assets/themes/zeppelin/img/docs-img/jdbc-simple-connection-setting.png ---------------------------------------------------------------------- diff --git a/docs/assets/themes/zeppelin/img/docs-img/jdbc-simple-connection-setting.png b/docs/assets/themes/zeppelin/img/docs-img/jdbc-simple-connection-setting.png new file mode 100644 index 0000000..6134b39 Binary files /dev/null and b/docs/assets/themes/zeppelin/img/docs-img/jdbc-simple-connection-setting.png differ http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/e4ab6043/docs/interpreter/jdbc.md ---------------------------------------------------------------------- diff --git a/docs/interpreter/jdbc.md b/docs/interpreter/jdbc.md index 65edded..f12c673 100644 --- a/docs/interpreter/jdbc.md +++ b/docs/interpreter/jdbc.md @@ -56,14 +56,15 @@ It is not necessary to add driver jar to the classpath for PostgreSQL as it is i #### Simple connection -Before creating the interpreter it is necessary to add to the Zeppelin classpath the path of the JDBC you want to use, to do it you must edit the file `zeppelin-daemon.sh` as shown: +Prior to creating the interpreter it is necessary to add maven coordinate or path of the JDBC driver to the Zeppelin classpath. To do this you must edit dependencies artifact(ex. `mysql:mysql-connector-java:5.1.38`) in interpreter menu as shown: -``` -# Add jdbc connector jar -ZEPPELIN_CLASSPATH+=":${ZEPPELIN_HOME}/jdbc/jars/mysql-connector-java-5.1.6.jar" -``` +<div class="row"> + <div class="col-md-11"> + <img src="../assets/themes/zeppelin/img/docs-img/jdbc-simple-connection-setting.png" /> + </div> +</div> -For create the interpreter you need to specify connection parameters as shown in the table. +To create the interpreter you need to specify connection parameters as shown in the table. <table class="table-configuration"> <tr> @@ -94,14 +95,15 @@ For create the interpreter you need to specify connection parameters as shown in #### Multiple connections -This JDBC interpreter also allows connections to multiple data sources. For every connection is necessary a prefix for reference in the paragraph this way `%jdbc(prefix)`. Before creating the interpreter it is necessary to add to the Zeppelin classpath all paths to access to each driver's jar file you want to use, to do it you must edit the file `zeppelin-daemon.sh` as following: +JDBC interpreter also allows connections to multiple data sources. It is necessary to set a prefix for each connection to reference it in the paragraph in the form of `%jdbc(prefix)`. Before you create the interpreter it is necessary to add each driver's maven coordinates or JDBC driver's jar file path to the Zeppelin classpath. To do this you must edit the dependencies of JDBC interpreter in interpreter menu as following: -``` -# Add jdbc connector jar -ZEPPELIN_CLASSPATH+=":${ZEPPELIN_HOME}/jdbc/jars/RedshiftJDBC41-1.1.10.1010.jar" -ZEPPELIN_CLASSPATH+=":${ZEPPELIN_HOME}/jdbc/jars/mysql-connector-java-5.1.6.jar" -``` -You can add all the jars you need to make multiple connections into the same interpreter. To create the interpreter you must specify the parameters, for example we will create two connections to PostgreSQL and Redshift, the respective prefixes are `default` and `redshift`: +<div class="row"> + <div class="col-md-11"> + <img src="../assets/themes/zeppelin/img/docs-img/jdbc-multi-connection-setting.png" /> + </div> +</div> + +You can add all the jars you need to make multiple connections into the same JDBC interpreter. To create the interpreter you must specify the parameters. For example we will create two connections to MySQL and Redshift, the respective prefixes are `default` and `redshift`: <table class="table-configuration"> <tr> @@ -114,7 +116,7 @@ You can add all the jars you need to make multiple connections into the same int </tr> <tr> <td>default.driver</td> - <td>org.postgresql.Driver</td> + <td>com.mysql.jdbc.Driver</td> </tr> <tr> <td>default.password</td> @@ -122,11 +124,11 @@ You can add all the jars you need to make multiple connections into the same int </tr> <tr> <td>default.url</td> - <td>jdbc:postgresql://localhost:5432/</td> + <td>jdbc:mysql://localhost:3306/</td> </tr> <tr> <td>default.user</td> - <td>gpadmin</td> + <td>mysql-user</td> </tr> <tr> <td>redshift.driver</td>
