Description

Using Mongo Query, the MongoEachToMapGen Generator will allow you to query one or more columns within a collection in a database allowing Find or Aggregate Query to be executed during EACH iteration of a given Generator. 


Note: Find or Aggregate Query at this level should only return one row in the result set.  Even if it returns more than one row, the Generator will only retrieve the first row.

 

This Generator works in concert with the MongoEachFromMapGen Generator. The MongoEachFromMapGen Generator maps to a given column that is managed by a MongoEachToMapGen Generator to generate its data for a given Attribute.


Note: To learn more about the MongoEachFromMapGen Generator, please click here.

 

Parameters

The following parameters may be used to configure the MongoEachToMapGen Generator. Parameters with an asterisk (*) are required.

  • resourcePath* - Defines the path where the resource file for MongoDB connection properties exists.
  • resourceSubDir - Defines an optional subdirectory under the resourcePath where the resource file for MongoDB connection properties exists.
  • resourceName* - Defines the name of the resource that contains the database connection information on a user's local machine.
  • grVar1 - The first of five possible variables that may be used within the query.
  • grVar2 - The second of five possible variables that may be used within the query.
  • grVar3 - The third of five possible variables that may be used within the query.
  • grVar4 - The fourth of five possible variables that may be used within the query.
  • grVar5 - The fifth of five possible variables that may be used within the query.
  • collectionName* - Defines the collection name present in MongoDB Database.
  • methodName* - Defines the method name in MongoDB Query.
  • query - Defines the MongoDB Query to run.
  • sort  - Defines the sort in MongoDB Query.
  • projection - Defines the projection for MongoDB Query.
  • list - Stores values into a list that is used for preview data only within the GenRocket web platform.