🔌Add a MongoDB connector
Configuring a MongoDB connection
Fill in the connection information:
Name (mandatory)
String
Use it to identify your connection
MyMongoDBConnection
Host (mandatory)
String
The domain name or IP address of your database server, for mongodb atlas you will use the full connection string
mongodb+srv://:@.mongodb.net/?retryWrites=true&w=majority (Mongo Atlas)
Username (mandatory)
String
your login username
my_mongo_user
Password (mandatory)
String
Your login password (will be stored as a secret)
my_mongo_password
SSL
Boolean
Flag to create the connection using SSL
Max_pool_size (optional)
Integer
Maximum number of connections in the connection pool
3 (default: 1)
Retry Policy (optional)
Boolean
Boolean allows to configure a retry policy if the connection is flaky.
max attempts: maximum number of retries before giving up
max_delay: in seconds, above the connection is dropped
wait_time: time in seconds between each retry
Slow Queries' Cache Expiration Time (optional)
Integer
Slow queries' cache expiration time in seconds
Click on the TEST CONNECTION
button then SAVE
the connection
After successfully configuring the connector, you will be able to find it in the Connector section of the DataHub "Datasource" tab
Create a dataset from a MongoDB connection
To create a dataset from MongoDB, click on the "create from icon", you will then be able to:
database
: The name of the database you want to querycollection
: The name of the collection you want to queryAdd a Query (optional): Use MongoDB aggregation pipeline to queries your collections , and return only the relevant results. After inputting your query, select "Preview" to review the results, and then click "Save" to create a dataset based on your chosen selection.
Misc
Error Handling
The connector handles various error scenarios, including:
Unknown database (UnkwownMongoDatabase)
Unknown collection (UnkwownMongoCollection)
Connection errors
Authentication failures
After selecting data from your connector you will be able to create a dataset thanks to YouPrep using the selection as "source step".
Last updated
Was this helpful?