Translating MQL for use with the MongoDB connector can be confusing. In this post I'm going to attempt to explain several common use cases and how to implement them with the Mules 4 MongoDB Connector. Hopefully by the end you will also have a better idea about the thought process that goes into making the translation.
Frequently when building integrations, especially batch jobs, we don't necessarily know the configuration for all of the systems we will be connecting to ahead of time; the configurations are typically (and should be) externalized. While it doesn't feel intuitive, we can create a global configuration and use scoped variables to dynamically create new connector configurations at runtime.