Home Services Partners Company
Using a JDBC Driver with Apache Zeppelin

Using a JDBC Driver with Apache Zeppelin

July 27, 2016 0 Comments

Have you heard of Apache Zeppelin? If you haven’t, you will soon hear about this looming BI tool. In this tutorial, learn how to use Progress JDBC connectors with this one-stop notebook to satisfy all your BI needs.

Apache Zeppelin is a one-stop notebook designed by the Apache open source community. This web based notebook can help you with:

  • Data Ingestion
  • Data Discovery
  • Data Analytics
  • Data Visualization and Collaboration

What sets Zeppelin apart from other similar tools others is its Interpreter. The interpreter allows you to write code in any language for data processing, which can then be plugged in to Zeppelin. It has support for interpreters for Apache Spark, R, Hive, Shell, Cassandra and more. With the recent release of 0.6.0, Apache Zeppelin started supporting JDBC as its interpreter. What this means is that now you can use Progress JDBC drivers to connect to any Relational, SaaS/Cloud, Big Data and NoSQL data sources.

To get you started, we created an easy tutorial on how to use Apache Zeppelin with the Progress DataDirect Oracle Database JDBC driver. Note that you can use the similar process with any of our JDBC drivers.

Before You Start

  1. Make sure that you have installed Java on your machine. You can check this by running the command java -version on your terminal.
  2. Install Apache Zeppelin by cloning this GitHub repository and by following instructions in the README file of the repository

Installing DataDirect Oracle JDBC Driver

  1. Download the DataDirect Oracle JDBC driver from here
  2. To install the driver, you have to execute the .jar package. You can do it by running the following command in terminal:
    java -jar PROGRESS_DATADIRECT_JDBC_ORACLE_ALL.jar
  3. This will launch an interactive java installer, which you can use to install the Oracle JDBC driver to your desired location as either a licensed or evaluation installation

Configure DataDirect Oracle JDBC interpreter in Apache Zeppelin

  1. If you haven’t started the Apache Zeppelin, start it by running zeppelin-daemon.sh start command in terminal at zeppelin_install_dir/bin
  2. Browse http://localhost:8080/ to access Zeppelin on your browser. You should see a welcome screen below if you have successfully connected.

    Welcome to Zeppelin

  3. To configure interpreter for Oracle JDBC, click on your username from the navigation bar and click on the option ‘Interpreter.’ This opens a new page which shows all the existing interpreters that have been configured.
  4. To create a new interpreter, click on ‘Create’ button as shown in the screenshot below:

    Interpreters

  5. Name your interpreter as you like, and for interpreter group choose ‘jdbc.’ You should see a new form with some default values filled in. I am going to change them as below to connect to Oracle DB using DataDirect Oracle JDBC driver.

     

    Properties:
    • Default.url: 
      jdbc:datadirect:oracle://<hostname>:<port>;SID=<SID>
    • Default.driver
      com.ddtek.jdbc.oracle.OracleDriver
    • default.user:
      <username>
    • default.password:
      <password>
              

      You can remove all the other properties by clicking the ‘X’ button under actions.

    Dependencies:
    • artifact:
      Data_Direct_Oracle_JDBC_install_dir/lib/oracle.jar
              

    Save the interpreter with these settings and your interpreter will be created. The following is a screenshot on how the configured interpreter looks after saving:

    Interpreter

Visualize Your Data

  1. Create a new Notebook by clicking on the Notebook drop down menu on the navigation bar, and then clicking on ‘Create new note.’ Name your new note and click OK.
  2. Before you start, you need to check if interpreter binding is properly done for this particular note. To do that you need to go to interpreter binding settings by clicking on a little gear icon on your Notebook. The following screenshot shows how to access it, in case you are unable to locate it:

    Interpreter Binding

  3. Make sure that you select the interpreter that we have created above. Unselect everything else that you don’t need and save the binding.
  4. By default, you should see %spark, which you should change to %jdbc, so that the notebook uses the JDBC interpreter we created in above steps
  5. In the next line, you can just run any query to fetch the data from Oracle DB to Apache Zeppelin according to your needs. In this tutorial, I have North wind sample data set in my Oracle DB, and I ran the query to fetch all the data from Orders table as shown below:

    Fetch All The Data From Orders Table

  6. Now that you have fetched your required data, change the view of results from tabular data view to bar charts, pie diagrams or line charts to see visualizations of your data. Below is a simple line chart, which visualizes the data for a number of orders from each country.Data Visualization

Now that you have learned how to visualize your data in Oracle using Apache Zeppelin, powered by DataDirect Oracle JDBC drivers, feel free to explore some of our other popular data sources:

Relational

Big Data

SaaS/Cloud

NoSQL

IBM DB2

Spark SQL

Salesforce

MongoDB

PostgreSQL

Apache Hadoop Hive

Marketo

Apache Cassandra

Microsoft SQL Server

Amazon EMR Hive

Oracle Eloqua

 

 

Progress DataDirect has covered them all with our fast, reliable and certified JDBC drivers. Visit our information page for more about all the Progress DataDirect JDBC drivers that are compatible with Apache Zeppelin. Better yet, you can try any of them free for 15 days! And don’t forget to subscribe to our blog via Email or RSS feed for more tutorials.

Are you excited about Apache Zepplin? Comment below to share your insight and let us know if you want a specific tutorial or topic covered!

Try Now

 

Nishanth-Kadiyala

Nishanth Kadiyala

Nishanth Kadiyala is a Technical Marketing Manager at Progress. He has worked as a Software IT professional for 3 years during which he actively pursued several technologies including database designing, SQL querying and Cloud Computing. He is currently pursuing his MBA at UNC Chapel Hill and concentrating in Marketing. At UNC, he became proficient with data analytic tools such as MEXL and R. He is interested in the SaaS, Cloud and data integration technologies that are revolutionizing the world we live in.

Read next Tutorial: Data Gateway from DigitalOcean to On-Premises
Comments
Comments are disabled in preview mode.