Connect from JDBC Driver
On this page
This page describes how to install and configure the
MongoDB JDBC Driver for connecting to a federated database instance. The JDBC driver is a
.jar
file that you can download and use from a BI tool or integrate
into a Java project.
Prerequisites
A federated database instance mapped to one or more data stores.
Note
If some or all of your data comes from an Atlas cluster, you must use MongoDB version 5.0 or greater for that cluster to take advantage of Atlas SQL.
An application or BI tool that you want to connect to your federated database instance with the JDBC driver.
Procedure
You can use the JDBC driver to connect a Java application like a Maven project, or downloaded and installed in a visualization tool like Tableau or DBeaver.
Note
If you want to use Atlas SQL from Tableau, see Connect from Tableau.
If you want to follow a tutorial that connects the MongoDB JDBC Driver to DBeaver (Community Edition), see Get Started.
Download the JDBC Driver
Download the latest MongoDB JDBC Driver version.
Important
To connect with the Atlas SQL interface, you must do the following:
Use MongoDB JDBC driver version 2.0.0 or later.
Download the
all.jar
file, which includes necessary driver classes and dependencies.
Integrate into Maven Project
Configure the driver for your Maven application.
To connect with your Maven application:
Click on the JDBC driver version in the JDBC Driver download page to open the JDBC Driver page for that version.
Click the copy icon in the Apache Maven on the right-hand side to copy the dependency.
For example: