- Using the MongoDB Connector for BI >
- Using the MongoDB Connector for BI with Atlas
Using the MongoDB Connector for BI with Atlas¶
Atlas is a cloud service for running, monitoring, and maintaining MongoDB deployments, including the provisioning of dedicated servers for the MongoDB instances.
Atlas uses TLS/SSL to encrypt connections and enforces authentication by default. This page explains how to connect to Atlas using the MongoDB Connector for BI.
Note
With the MongoDB Atlas free tier, MongoDB Connector for BI cannot run aggregation pipelines
using the allowDiskUse
option. This option allows aggregation stages to
write data as temporary files to disk. To review the MongoDB Atlas free
tier constraints, see the MongoDB Atlas manual.
mongodrdl
¶
To create a DRDL file from an Atlas database, use the following command format:
For more information, see mongodrdl
.
mongosqld
¶
To connect mongosqld
to an Atlas cluster, you must provide a
.pem
key file.
mongosqld
can use any valid TLS certificate issued by a
certificate authority, or a self-signed certificate. If you use a
self-signed certificate, although the communications channel will be
encrypted, there will be no validation of server identity. Although
such a situation will prevent eavesdropping on the connection, it
leaves you vulnerable to a man-in-the-middle attack. Using a
certificate signed by a trusted certificate authority will permit your
MySQL client to verify the server’s identity.
For testing purposes, you can create a .pem
key file named test.pem
using the openssl
tool:
Start mongosqld
with the --auth
and
--sslPEMKeyFile
options.
If you named your key file test.pem
as in the previous example, you
can run the following, substituting your schema file and
cluster URI:
Note
Do not specify a username and password in --mongo-uri
. The
connection string should only contain the list of servers.
Pass your username, password, and authentication database to your SQL
client. For example, using mysql
without verifying your mongosqld
server certificate:
Refer to Connect with the MySQL Client for more details on using the
mysql
client with the MongoDB Connector for BI.