(Original Documents has an array of writers which we now split into individual records. $unwind – to split rows based on writers.$match to filter out series whose rating is “Approved”.Go to the Aggregation Tab in MongoDB compass and add the stages with the required transformation you want to perform on the data. Once you have loaded, you’ll see the records are inserted successfully. You can import Data in JSON or CSV (NO SQL are all in JSON format). I have created a JSON file with sample data, we can add one or more rows. Next, insert Documents (which we call rows in SQL Terms).I have used “my-best-series” for this POC. Create a new Collection (which we call Table in SQL Terms).Use the URL that we got from Step 1, which connects you to DBīy default, you will now be able to see two Databases: admin and local.įor this POC I have created a new database called “mule” Step 3:.Next, download MongoDB compass – Similar to WorkBench, this is just a visual interface where we are able to perform the operations. Tick the “I have MongoDB compass” box and copy the URL right under – It helps connect using MongoDB compass.Once the cluster is created, the steps to take are as follows: However, you may also choose the on-prem installation. This is an easier hands-on way of setting up the server. Step 1:Ĭreate an online free cloud-based MongoDB server – Mongo Atlas through the following link: ( ). Initially, I found it challenging and went through all the possibilities to see how we would be able to execute the pipeline in Mule. Following extensive research, I eventually found a solution that is quite simple, which I would like to share with you.īefore introducing the method of running the Aggregation Pipeline command in Mule 4 – MongoDB connector – “Execute Command” component, I would like to show you simple steps to firstly set up MongoDB for your POC (Proof of Concept) purpose. We have the “Execute Command” component under the MongoDB connector. We have seen MongoDB Connector within Mule 4 and there is no specific component for Aggregation. Well, the aggregation pipeline is a framework for data aggregation modelled based on the concept of data processing pipelines. How does it work? Documents simply enter a multi-stage pipeline that transforms them into aggregated results. You must have already encountered the term “Aggregation Pipeline” while using MongoDB and may potentially be wondering what it referred to. Using the Mule 4 MongoDB Connector-Execute Command Operation
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |