Use Third-Party Tools to Connect to Athena Tables
Amazon Athena is an interactive query service that allows you to analyze data in the Tetra Data Lake using standard SQL. To transform and run SQL queries on your Tetra Data using third-party tools, you must first connect the tool to Amazon Athena by downloading, installing, and configuring a Java Database Connectivity (JDBC) or Open Database Connectivity (ODBC) driver.
To set up the connection, you'll need the following Athena Credentials from the SQL Access page:
- ACCESS KEY
- SECRET KEY
- DRIVERS
- URL (address for Athena) connection parameter
- S3OUTPUTLOCATION connection parameter
For more information, see Connect to Amazon Athena with ODBC and JDBC drivers in the AWS Documentation.
IMPORTANT
If you're using a third-party tool to query Athena tables, you must declare which database that you want to connect to up front.
To declare your database up front, make sure that you use the table names as they appear in the TDP. If you don't declare the database up front, then you must add the database name in your query in the following format:
org_slug.tablename
(for example:demo_uat.lcuv_empower_v2_injection
).
NOTE FOR CUSTOMER-HOSTED DEPLOYMENTS
For customer-hosted Tetra Data Platform (TDP) deployments, keep in mind the following:
- Amazon Athena credentials aren't provided on the SQL Access page if the deployment parameter
AthenaCreateIamUser
is set tofalse
. Instead, you'll need to provide the required Athena credentials for the JDBC or ODBC driver connection through an AWS Identity and Access Management (IAM) user or role that's assigned the following IAM policy:ts-platform-<awsRegion>-production-<orgSlug>-policy
.- Using the Amazon Athena JDBC or ODBC driver will result in additional costs in your AWS account, because the driver runs Amazon Athena queries. Query costs depend on the amount of data stored in your environment. For more information, see Amazon Athena Pricing in the AWS documentation.
What Driver Should I Use?
If you're connecting to a Java-based application, such as Tableau or Java Spring, it's recommended that you use a JDBC driver to help improve query performance. For applications that don't use Java, such as JMP Statistical Software, use an ODBC driver.
For installation instructions, see the following in the AWS documentation:
For more information about setting up an ODBC driver, including guidance on how to test the connection, see Amazon Athena ODBC Driver Configuration and SQL Query Test in the TetraConnect Hub. For access, see Access the TetraConnect Hub
NOTE
For JDBC drivers, make sure that you select the driver that works with your current Java version (for example, JDK 8.0 or JDK 9.0).
Example Connection Types
The following are example connection setups for common third-party analytics tools:
Security
Every organization on the TDP is automatically provisioned with a separate AWS KMS (Key Management Service) Key. The query result is encrypted using SSE_KMS
(The driver uses server-side encryption with an AWS KMS-management Key).
The JDBC and ODBC driver automatically applies Secure Sockets Layer (SSL)/Transport Layer Security (TLS) encryption to all connections. SSL/TLS encryption protects data and credentials when they are transferred over the network, and provides stronger security than authentication alone.
The TLS version that the JDBC driver supports depends on which Java virtual machine (JVM) version is installed. The TLS version used for the connections is the latest version that is supported by both the driver and the server.
Reference: Oracle Blog: Diagnosing TLS, SSL, and HTTPS
Updated 17 days ago