🔌Setting up a MongoDB connector
Last updated
Last updated
This connector is used to retrieve data from a MongoDB database, which is also a NoSQL database. This is a clear example that shows Toucan’s vast spectrum of connectivity, allowing our users to connect to RDBMS’s as well as NoSQL DB’s like MongoDB with ease!
Fill in the connection information:
host: The domain name or IP address of your database server, for mongodb atlas you will use the full connection string for example mongodb+srv://:@.mongodb.net/?retryWrites=true&w=majority
port: (Optional) The listening port of your database server
username: (Optional) Your login username
password: (Optional) Your login password
ssl: (Optional) Boolean flag to create the connection using SSL
max_pool_size: Maximum number of connections in the connection pool (default: 1)
Then click TEST CONNECTION
and finally SAVE
it.
After successfully configuring the connector, you will be able to find it in the Connector section of the Datahub "Datasource" tab
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 query
collection: The name of the collection you want to query
Add 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.
The connector handles various error scenarios, including:
Unknown database (UnkwownMongoDatabase)
Unknown collection (UnkwownMongoCollection)
Connection errors
Authentication failures
For more info, see the dedicated section Creating datasets
After selecting data from your connector you will be able to create a dataset thanks to YouPrep using the selection as "source step".