MongoDB

This quickstart describes how to create a MongoDB connection.

Create a connection to MongoDB

To ingest data from MongoDB using Upsolver, you must first create a connection with the appropriate credentials to access your database.

Your connection is persistent, so you won't need to re-create it for every job. The connection is also shared with other users in your organization.

Here’s the code for creating a connection to MongoDB:

// Syntax
CREATE MONGODB CONNECTION <connection_identifier> 
    CONNECTION_STRING = '<connection_string>' 
    USER_NAME = 'your_username'
    PASSWORD = 'your_password';
    
// Example
CREATE MONGODB CONNECTION my_mongodb_connection
    CONNECTION_STRING = 'mongodb+srv://upsolver.example.mongodb.net/testdb'
    USER_NAME = 'your_username'
    PASSWORD = 'your_password';

After you complete this step, you should see the my_mongodb_connection connection in your navigation tree.


Learn More

Please see the SQL command reference for MongoDB for the full list of connection options, and examples.

Last updated