Mongo
Create Datasource / Event
To create a datasource or event with MongoDB, follow these steps:
Step 1
Repeat steps 1 and 2 mentioned above to display the new datasource creation section and provide a descriptive name.
Step 2
Select the “Mongo” tab.
Step 3
In the “Code Line” field, write the code you want to execute.
Step 4
Optionally, you can specify the output fields you want to display from the query in the “Output Fields” section below the code line.
Step 5
In the “Execution mode” field, you must select one of the two available options: “Current version” or “Historical version”. This field is mandatory. For more information about these options, see the detailed explanation.
An additional field called “Connection” will appear next to the “Name” field. Here, you must select the data source from which you want to retrieve the information. This data source is obtained from the “Environments” section, where you have previously configured connections to databases or external systems.

For MongoDB events, there is an additional mandatory field called “Operation Type” with two options:
- insertOne: Used when you want to insert a new document into the collection.
- aggregate: Used when you want to retrieve data from the collection. This option is particularly useful for data preload events.

Step 6
Once you have completed all the required fields, you can execute it to verify if it runs correctly. To do this, click on the “Execute” tab.
Step 7
Once configured and tested, navigate to the Mongo tab and click the “Create” button.