Connect from DBeaver
On this page
This page describes how to connect to your federated database instance with DBeaver.
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.
Procedure
To connect to your federated database instance from DBeaver:
In Atlas, go to your federated database instance for your project.
If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.
If it's not already displayed, select your project from the Projects menu in the navigation bar.
In the sidebar, click Data Federation under the Services heading.
The Data Federation page displays.
Select JDBC Driver.
Note
This tutorial uses the JDBC Driver to connect. See Connect Using the Atlas SQL Interface for alternative connection methods.
Connect from DBeaver.
Launch DBeaver.
Add a new driver.
In DBeaver, click Database and select Driver Manager from the dropdown menu.
Click New to open the Create new driver modal.
In the Settings tab, enter the following information:
Driver NameMongoDB
Class Namecom.mongodb.jdbc.MongoDriver
In the Libraries tab, click Add File and add your JDBC driver
all.jar
file.Click Find Class.
Click OK. The Create new driver modal closes.
Create a database connection.
In DBeaver, click Database and select New Database Connection from the dropdown menu to open the Connect to a database modal.
From the list of databases, select the
MongoDB
database driver that you created in the previous step.If you don't see
MongoDB
, select the All category inside the modal.Click Next.
In the Main tab, enter the following information:
JDBC URLYour connection string from step 5.UsernameThe MongoDB user to connect with.PasswordThe MongoDB user's password.In the Driver properties tab, expand User Properties. Add the following key-value properties:
databaseThe name of your virtual database.userThe MongoDB user to connect with. Not required if you entered aUsername
in the previous step.passwordThe MongoDB user's password. Not required if you entered aPassword
in the previous step.
Click Finish.
Run Atlas SQL Queries
To run Atlas SQL queries in DBeaver:
Enter a SQL query in the console.
For example queries, see Query with Atlas SQL Statements.