MongoDB
This page describes how to create a connection to MongoDB using a SQL command.
To ingest data from MongoDB using Upsolver, you must first create a connection with the appropriate credentials to access your database.
Syntax
CREATE MONGODB CONNECTION <connection_identifier>
CONNECTION_STRING = '<connection_string>'
USER_NAME = 'your username'
PASSWORD = 'your password'
[ TIMEOUT = INTERVAL '<integer>' SECONDS ]
[ COMMENT = '<comment>' ]
Jump to
Connection options
CONNECTION_STRING
— editable
CONNECTION_STRING
— editableType: text
The connection string to use when connecting to the server.
USER_NAME
— editable
USER_NAME
— editableType: text
The user to authenticate to the database with.
PASSWORD
— editable
PASSWORD
— editableType: text
The password for the user.
TIMEOUT
TIMEOUT
Value: INTERVAL '<integer>' SECONDS
Default: 30 SECONDS
(Optional) Timeout will override the timeout setting specified in the connection string.
COMMENT
— editable
COMMENT
— editableType: text
(Optional) A description or comment regarding this connection.
Example
CREATE MONGODB CONNECTION my_mongodb_connection
CONNECTION_STRING = 'mongodb+srv://upsolver.example.mongodb.net/testdb'
USER_NAME = 'your_username'
PASSWORD = 'your_password'
TIMEOUT = INTERVAL '10' SECONDS
COMMENT = 'Connection to MongoDB';
Last updated