Installing Apache Zeppelin on my Mac was pretty easy! I then connected it to Amazon Athena.
I mostly used information from:
- Using Amazon Athena with Apache Zeppelin | by Yuta Imai | Medium
- Getting Started (The URL says version 0.6.0, might be a newer version now!)
Download & Install
- I downloaded the
zeppelin-0.9.0-bin-all.tgz
binary (current version at the time) from Apache Zeppelin Download - Unzipped the file by simply double-clicking on it
Start / Stop
bin/zeppelin-daemon.sh start
bin/zeppelin-daemon.sh stop
Access Zeppelin
http://localhost:8080
Add an Interpreter for Amazon Athena
- Download driver from Links for Downloading the Athena JDBC Driver official page
- I then found that Using Amazon Athena with Apache Zeppelin | by Yuta Imai | Medium was the best resource for configuring the Interpreter
- However, the driver name has changed to
com.simba.athena.jdbc.Driver
- Some information from Connecting Apache Zeppelin Up to Amazon Athena with an IAM Profile Name | rud.is was thus useful.
The fields I configured were:
- default.url:
jdbc:awsathena://athena.ap-southeast-2.amazonaws.com:443
(Your region might be different) - default.user (IAM Access Key)
- default.password (IAM Secret Key -- not very secure, but I couldn't figure out how to get it to use the AWS credentials file)
- default.driver:
com.simba.athena.jdbc.Driver
- default.s3_staging_dir (Added this property myself, and pointed it to an Amazon S3 location to store the Output of Athena queries)
- Artifact: Provided the full path to the downloaded Athena JDBC driver
Hint: I had a problem referencing the Driver when the path included a space, so be careful where you put the driver file!
The credentials used to access Amazon Athena are also used to access the source data in Amazon S3.
Query the data
Simply use the name of the Interpreter at the top of the section, eg:
%athena
SELECT 42
Selecting a Schema
To change the default schema, append the information onto the JDBC URL: jdbc:awsathena://athena.ap-southeast-2.amazonaws.com:443;schema=my-schema
Similar options are available in the driver documentation.
Top comments (0)