Xplenty loves MongoDB - MongoDB is great for storing and querying data, while Xplenty is great for transforming the data and getting it ready for analysis. That’s why we integrate with MongoHQ, one of the leading MongoDB-as-a-Service solutions. Since MongoHQ is built on the cloud, it allows for fast and scalable work with MongoDB. With Xplenty also available on the cloud, you can read data right from a MongoHQ collection, process it via Xplenty’s user interface, and store it right back.
Sign in to your MongoHQ account or sign up if you don’t have one.
Open the relevant DB in the dashboard.
A database user must be added. If there is no user, a message will prompt you to create one. Click it and follow the instructions. Keep a note with the database username and password on the side (note - they may be different than the username and password for the whole account).
Click the Admin link on the left. Check the line that appears under “Mongo URI” in “Connection Strings” and note down the host and port number. E.g., if the URI displayed is
mongodb://<user>:<password>@oceanic.mongohq.com:10063/customers, then the host is oceanic.mongohq.com and the port number is 10063.
If you need to migrate data into your MongoHQ database, please refer to the documentation.
In your account, click the user image on the top right and choose Account settings.
Click the Connections menu on the left, click New Database Connection, and choose MongoDB.
Enter any name that you want for the connection, and then insert the relevant MongoHQ database details. Note that the username and password are for the specific database which you are trying to access, not the MongoHQ account. Also make sure to disable the “Connect using SSL” checkbox since it isn’t supported.
Click the Test Connection button at the bottom to make sure the connection works. If it fails, one of the details that you entered is incorrect. Go back to the MongoHQ Settings section and make sure all the details are accurate.
Click the Create MongoDB Connection button.
Create a new Xplenty package via My Packages, New Package, to define your new data flow.
Click the component that was just added. The MongoDB Source dialog should appear. Choose the MongoDB connection that you previously created in the MongoDB Connection dropdown, and enter the source collection name. Click the green auto-detect schema button on the right. The schema should be filled automatically. For more info how to work with MongoDB source components, please refer to the help section.
Back on the package screen, add components to process the data as necessary.
To save the processed data back on MongoHQ, add a MongoDB destination. Click the component to open the edit dialog. Choose the relevant MongoDB connection and enter the target collection (probably different than the source collection). Note that you can also store the output of the data flow to a relational database or to delimited files, using other destination components.