Apache Zeppelin is a multi-purpose software that can be used for data visualization, data ingestion, data discovery and data analytics. You can check the below mentioned URL to know more about it and to download the software.
In download section, I’ll suggest to download the “Binary package with all interpreters” which provides number of interpreters that can be used to connect to various sources. In today’s tutorial, we will see:
- How to create interpreter to be used for Teradata in Zeppelin?
- How to connect to Teradata using interpreter and run queries?
- How to create simple pie-chart for data visualization report?
Note: We assume you have already downloaded and installed Zeppelin. In our case we have HDP 2.5 installed on my local vm.
Step 1: Open the Zeppelin URL: http://127.0.0.1:9995
*in your case, check for the port number on which you have installed it. By default, port is 8080 which may result in some conflict with other software. In HDP, it is 9995.
Step 2: Creating a new Interpreter:
Once Zeppelin is open, click on the drop down button at top-right corner next to user “anonymous” and select “interpreter”
Step 2.a: We will be using TERADATA JDBC connection to connect to Teradata. So let’s scroll down to JDBC interpreter and add following 4 properties:
Value: jdbc:teradata://192.168.145.100 (change IP with your Teradata SERVERIP)
Value: DBC (change user with your Teradata USER)
Value: DBC (change password with your Teradata password)
Now scroll down to dependencies and give the path of 2 jdbc jar (tdgssconfig.jar, terajdbc4.jar
) files which are required to connect to Teradata. You can download JDBC driver for Teradata from below mentioned link:
I have placed these two jar files @ below mentioned path:
Hence added these two paths in dependencies artifact in jdbc interpreter.
Now save & restart JDBC interpreter.
Step2.b: Now we want to create a dedicated TERADATA interpreter. So click on “Create” button on top-right corner in Interpreter screen.
Now give the name of interpreter as “teradata”. Select interpreter group as JDBC.
In the default parameters put the value you have mentioned in Step2.a.
You can remove other sources like postgresql, tajo etc.
Again add in dependencies, the two jar files path. Save & Restart the interpreter.
Step3: You have done the configuration required to connect to Teradata via Zeppelin. Now click on “Notebook” at the top and click on “Create new note”. Give it some name – like TD1. In the paragraph write below command:
select tablename,tablekind from dbc.tables where databasename=’dbc’ order by tablename
Now run the paragraph. First time execution is slow however subsequent queries execution will be much faster. Once you run the query you can see data like in the image below:
You can see the data in Tabular format by default. If you want to see various charts , then click on chart icons present above the table.Example you clicked on pie-chart icon you can see pie-chart from the data. If you do not see any chart or to change the key columns, click on settings which will appear as soon as you click on pie-chart icon. Select a column and add to keys and other column as values. It should look like below image:
So now you have connected to Zeppelin and executed basic query and also build simple pie-chart with the data.
Let me know if you face any issue in connecting Teradata via Zeppelin.