Connecting to MongoDB
PuppyGraph supports connecting to MongoDB through two different approaches, each designed for specific MongoDB deployment types.
MongoDB Atlas
MongoDB Atlas is a fully managed cloud database service. Atlas SQL provides a JDBC-compatible interface to MongoDB Atlas, allowing you to connect your Atlas clusters to PuppyGraph for graph analysis. For more information about MongoDB Atlas, see the MongoDB Atlas documentation.
Prerequisites
- The MongoDB Atlas cluster is accessible over the network from the PuppyGraph instance.
- Atlas SQL connection instance is created in your MongoDB Atlas cluster.
Configuration
| Configuration | Explanation |
|---|---|
| Username | The username of the Atlas SQL connection |
| Password | The password of the Atlas SQL connection |
| JDBC Connection String | A JDBC compatible connection URI of the Atlas SQL connection. See the MongoDB Atlas SQL documentation for more details on how to obtain the JDBC URI. |
Data Type Mapping
The mapping below applies to connections through Atlas SQL.
| MongoDB Type | PuppyGraph Type | Description |
|---|---|---|
bool |
Boolean |
True or false |
int, long |
Long |
64-bit signed integer |
double |
Double |
64-bit IEEE 754 floating point |
decimal |
String |
Decimal as text. Atlas SQL reports no precision for decimal, so its precision and scale cannot be determined |
string |
String |
Character strings |
objectId |
String |
ObjectId in its hexadecimal text form |
binData |
Binary |
Byte sequence |
date |
DateTime |
Date and time |
- Columns of any other BSON type, such as
object,array,regexortimestamp, are not supported. They are listed in Schema Builder, but you cannot add them to a node or edge as attributes.
If you need a data type that is not supported, or one that is not listed here, contact us.
Demo
See Querying MongoDB Atlas Data as a Graph for a complete demo for MongoDB Atlas. The demo includes setting up the Atlas SQL connection and obtaining the JDBC URL.
MongoDB BI Connector
MongoDB BI Connector provides a MySQL/MariaDB-compatible interface to MongoDB. This approach is suitable for on-premises MongoDB deployments, MongoDB deployed on virtual machines, or any self-managed MongoDB instance. For more information about MongoDB BI Connector, see the MongoDB BI Connector documentation.
Prerequisites
- The MongoDB BI Connector instance is accessible over the network from the PuppyGraph instance.
- MongoDB BI Connector is configured and running on your MongoDB deployment.
Configuration
| Configuration | Explanation |
|---|---|
| Username | The username of the BI Connector connection (if authentication is enabled) |
| Password | The password of the BI Connector connection (if authentication is enabled) |
| JDBC Connection String | A JDBC-compatible connection URI for the BI Connector. See this page for details on configuring the BI Connector. The connection uses the MySQL protocol under the hood. |
Demo
See Querying MongoDB BI Connector Data as a Graph for a complete demo for MongoDB BI Connector. The demo includes setting up the connection to a MongoDB BI Connector instance.