Databases - Advanced
Custom MongoDB Resources

Custom MongoDB Resources

To create a custom MongoDB resource defined via an aggregation pipeline, go to Company Settings → Data Sources. Click on the desired MongoDB data source. 

Under “Resources”, click on “Add New”: 

Name your custom resource at the top. 

Then, enter in the name of the MongoDB collection with your data. This must match an existing collection within your MongoDB data source.

Within the input field, you can enter in your aggregation pipeline to define the data that you want in your resource. See the screenshot above for an example. For more information on aggregation, you can refer to the MongoDB documentation for quick reference and SQL-to-aggregation mapping chart.

Hit “Apply” to create your custom resource.


Things to know about custom resources:

  1. Custom resources have their own permission sets and do not inherit the permission settings of the original resources that their data comes from. You can configure permissions for custom resources in Roles & Permissions within Company Settings.
  2. You cannot write to a custom resource. These resources are a view of other resources, specified through a custom query or aggregation. If you wish to edit the data, you should write to the original resource that contains the data.
  3. Correspondingly, no functions are generated for a custom resource, since you cannot write to them.
  4. Only admins can create custom resources.