Navigation

Connect to Data Lake with JDBC Driver

Note
Beta

The support for SQL format queries is available as a Beta feature. The feature and the corresponding documentation may change at any time during the Beta stage.

You can use the JDBC driver to connect to Atlas Data Lake and run SQL format queries on your Data Lake collections and views. The JDBC driver can be used to connect a Java application like a Maven project or a visualization tool like Tableau. To run SQL format queries, your collections or views must already have the relational schema set. See Querying with SQL to learn more about automatically or manually generating and setting schemas for your collections and views.

This page describes how to install and configure the JDBC driver for connecting to Atlas Data Lake.

1

To connect with your Maven application:

  1. Click on the JDBC driver version in the JDBC Driver download page to open the JDBC Driver page for that version.
  2. Click the copy icon in the Apache Maven on the right-hand side to copy the dependency.

    For example:

    Image highlighting JDBC Driver Maven dependency
2
Image highlighting Maven dependency
Note

You can only connect to one database at a time. To query multiple databases, you must create multiple connections or fully specified SQL queries. When you use the JDBC driver to connect to Atlas Data Lake with Tableau, you can only connect to the database specified in your properties file.

1
Image highlighting JDBC Driver for Tableau
2
Operating System
Folder Path
Windows
C:\Program Files\Tableau\Drivers
MacOS
~/Library/Tableu/Drivers
3

To connect with Tableau, create a properties file with the following settings:

user=<database-user>
password=<database-user-password>
authSource=admin
database=<database-to-query>
ssl=true
compressors=zlib
Property
Description
user
Username of the database user in your Atlas cluster.
password
Password of the database user in your Atlas cluster.
authSource
Authentication database of the database user in your Atlas cluster, which is always admin.
database

Database in the Atlas cluster that contains the data to query.

Important

When you use the JDBC driver to connect Tableau to Atlas Data Lake, you can only connect to the database specified here.

ssl
Whether format of the query is SSL. Value must be true.
compressors
File compression format. Value must be zlib.
4
5
Tableau UI for selecting other databases
6
UI Field
Description
URL

Specify your Data Lake URL in the following format:

jdbc:<your-data-lake-URL>/<database-to-connect-to>

To construct the URL:

  1. Prepend jdbc: to your Data Lake URL. You can get your Data Lake URL from your Data Lake connection string. For information on how to get the Data Lake connection string, see Connect to Your Data Lake. For example, your Data Lake URL in the connection string should look similar to the following:

    "mongodb://myTestDL-7hgjn.a.query.mongodb.net/<dbname>"

    For example, to the preceding Data Lake URL, prepend jdbc: as shown below:

    jdbc:mongodb://myTestDL-7hgjn.a.query.mongodb.net/<dbname>
  2. Replace <dbname> at the end of your Data Lake URL with the name of the database to which you want to connect. For example, to connect to a database named testDB using the connection string in the previous step:

    jdbc:mongodb://myTestDL-7hgjn.a.query.mongodb.net/testDB
Dialect
Select MySQL from the drop-down.
Properties File
Click Browse and select the properties file to use for this connection.
Note

You can leave the Username and Password fields empty if you specified them in the properties file.

7
8
Tableau UI for selecting Data Lake database
Give Feedback