Follow Us On social
5717 Legacy Dr, Ste 250, Plano TX 75024 info@79consulting.com +1 (469) 606-9656
mongodb integration boomi

MongoDB Integration with Boomi: A Step-by-Step Guide

MongoDB is a NoSQL document database, storing data in a type of JSON format called BSON. Integrating MongoDB with Boomi offers several advantages, making it a strategic choice for organizations looking to streamline their data workflows and enhance overall efficiency. This blog will guide you through two essential tasks: querying data from MongoDB and creating new data entries. Read more about how its done:

1. Query data from MongoDB:

Create a process with shapes in Boomi as shown in the below image.

mongodb integration boomi

 Click on Configure, to configure the MongoDB connector.

Create a new connection by clicking on the  + icon in the Connection field.

integrate mongodb with boomi

For creating a local host connection, we need Hostname/ IP address, Port number and Database name. The Default Port number is 27017.

The Database name and Host can be retrieved from the MongoDB compass.

The Host name will be shown while creating a new connection. If not saved, you can verify the information in the connection details next to the connection name in MongoDB Compass.

integrate mongodb with boomi
integrate mongodb with boomi

The Database name will be available in the Compass Dashboard.

integrate mongodb with boomi

Enter all the details below into the MongoDB connection.

integrate mongodb with boomi

Test the connection before saving and use it only if the test connection is successful. 

After configuring the connection, set the Action field to Query. Next, create a new operation by clicking the + icon in the operation field.

integrate mongodb with boomi

In the new operation, click on the Import Operation button to import the profile.

integrate mongodb with boomi

In the popup, choose values for Atom, connection, Option field checked, Datatype as ObjectId and Id.

integrate mongodb with boomi

Retrieve the ObjectId of any existing data within the collection and then input this ObjectId value into the Id field.

integrate mongodb with boomi

Also, a proper JSON schema will be generated only when the Options field is checked.

Click on next, after passing all the values. On the next tab, you should see the collection from which you have passed the Id.

integrate mongodb with boomi

Click on next and the, operation will be successfully loaded.

integrate mongodb with boomi

With the successful loading of the operation, you are now ready to proceed with testing.

If you want to query only records based on specific fields, you can use the filters in the operation.

integrate mongodb with boomi

Click on save and close for operation ok to the connector.

After the process has been done configuration, save and test the process using a local atom.

integrate mongodb with boomi

You should get all the documents matching the operation from that collection at the MongoDB shape in Connection Data.

integrate mongodb with boomi

In the document, the value of field $oid is the Objectid. This Objectid will be shown, only when _id > $oid  field is checked in the operation.

2. Create data on MongoDB:

Create a process with shapes in Boomi as shown in the below image.

Configure the message shape to pass the input data in a proper JSON format, to create a new document in MongoDB.

integrate mongodb with boomi

After passing the input in message shape, now configure the MongoDB shape as done in the previous process. You can use the same connection for this process. 

While creating the operation, make sure to create a new Operation when the Action field is being set to Create.

integrate mongodb with boomi

Import the Operation, using the ObjectId of an existing data as done in the previous process.

integrate mongodb with boomi

After Configuring the Operation, save and close the operation. Click on OK on the connector to save changes made on the connector.

Now, in the map shape, create a new map, and map the fields in the input shape to the destination JSON profile properly.

integrate mongodb with boomi

After configuring all the shapes has been done properly, save the process and test it using a local atom.

integrate mongodb with boomi

The connection data of the MongoDB shape must contain the created documentJSON data in it.

And the Stop shape will contain the ObjectId of the created document in Shape Source Data.

integrate mongodb with boomi

We can also verify whether the document is created or not by checking the collection in MongoDB Compass as in the below image.

integrate mongodb with boomi

Post a Comment

Top