Description

GenRocket Query Generators query columns, tables, or a list of values within a specified file or database during test data generation. GenRocket provides several Query Generators described in further detail within this article.


In This Article


When should Query Generators be used?

  • Any time you want to query real data from within a specified file or database.

Why are Query Generators useful?

  • Query Generators make it easy to blend real data values with synthetically generated data. For example, combining real postal addresses with synthetically generated names.

  • Query Generators make it easy to create a subset of real production data.


Database Table/Column Query Generators

The following Query Generators can be used to query database tables and columns:
 

Generator Name

Description

Additional Reading

QueryBeforeLoopGenQueries a column within a table using an SQL select statement BEFORE the 1st iteration of test data generation.Not Currently Available
QueryBeforeLoopV2GenQueries a column within a table using an SQL select statement BEFORE the 1st iteration of test data generation. How do I use the QueryBeforeLoopV2Gen Generator?
QueryCountGenCreate and execute a 'selectcount(*)'  query statement.Not Currently Available
QueryCountV2Gen
Create and execute a 'selectcount(*)'  query statement.
Not Currently Available
QueryEachLoopGen

Query a column within a database table using an SQL select statement on EACH iteration of test Generation.

Not Currently Available
QueryEachLoopV2Gen

Query a column within a database table using an SQL select statement on EACH iteration of test Generation. 

How do I use the QueryEachLoopV2Gen Generator?
QueryEachToMapGen
Using SQL, query one or more columns within a table in a database allowing for full select statements to be executed during EACH iteration of a given Generator.
Not Currently Available
QueryEachFromMapGenReads the value of a particular column from the result of QueryEachToMapGen.Not Currently Available
QueryToMapGen
Query data from one or more database table columns into a memory buffer.
How do I use the QueryToMapGen Generator?
QueryFromMapGenMaps to a given column that is managed by the QueryToMapGen to generate its data for a given Attribute.How do I use the QueryFromMapGen Generator?
QueryLoopSetGenQuery only once within a table in a database and set the loopCount.Not Currently Available
QueryMapBeforeLoopGen
Query two columns from one or more joined database tables to create a map in memory.Not Currently Available
QueryOnceGenQuery only once within a table of a database using SQL.Not Currently Available
QueryOnceV2GenQuery only once within a table of a database using SQL.
Not Currently Available
QueryReGenerateOnHitGen
Query a column in a database table, using an SQL statement, on EACH iteration of test generation and validates whether the referenced value exists or not. If the value exists, the Generator calls the Generator of referenced value to regenerate the next value, which is again validated for its existence.
How do I use the QueryReGenerateOnHitGen?
QueryMaxGenQueryMaxGen Generator allows querying the max value of a column within a table using an SQL select max() statement.Not Currently Available
QueryContextLoadListGenQueries a database table and loads resulting data into a list that is stored in memory. Not Currently Available
QueryContextLoadMapGenQueries multiple database columns and loads the resulting data into maps stored in memory. Not Currently Available
RangeQueryGenQuery for max row within a given table and set the startRange to the value of the result returned + 1.Not Currently Available
RangeQueryV2GenQuery for max row within a given table and set the startRange to the value of the result returned + 1.Not Currently Available



MongoDB Query Generators

The following Query Generators can be used to query data within a MongoDB database:
 

Generator Name

Description

Additional Reading

MongoToMapGen

Queries data from one or more database collection columns into a memory buffer. 

How do I use the MongoToMapGen and MongoFromMapGen Generators?
MongoFromMapGenMaps to a given column that is managed by a MongoToMapGen Generator to generate its data for a given Attribute.
How do I use the MongoToMapGen and MongoFromMapGen Generators?
MongoEachToMapGen

Allows 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. 


How do I use the MongoEachToMapGen Generator?
MongoEachFromMapGenMaps to a given column that is managed by a MongoEachToMapGen Generator to generate its data for a given Attribute.

How do I use the MongoEachFromMapGen Generator?



CSV File Query Generators

The following Query Generators can be used to query data and metadata within CSV files:
 

Generator Name

Description

Additional Reading

CSVToMapGenAllows you to read data from one or more columns from a CSV file. How do I use the CSVToMapGen and CSVFromMapGen Generators? 
CSVFromMapGenReads the value of a particular column by Column Name from the result of CSVToMapGen. How do I use the CSVToMapGen and CSVFromMapGen Generators?
CSVIndexToMapGenReads the value of one or more columns from a particular row in a CSV file.Not Currently Available
CSVIndexFromMapGenReads the value of a particular column by Column Name from the result of CSVIndexToMapGen.Not Currently Available
CSVResourceGenLoads column data from the first detail row within a CSV file.Not Currently Available
CSVResourceIndexGenLoads column data from a given row within a CSV file.Not Currently Available
ListCSVGenLoads list from column data within a CSV file.How do I use the ListCSVGen Generator?
ListCSVV2GenLoads list from column data within a CSV file.Not Currently Available
ListCSVIndexGenLoads list from column data within a CSV file.How do I use the ListCSVIndexGen?
MapCSVGenLoads list from column data within a CSV file. How do I use the MapCSVGen Generator?
MapCSVChildGenLoads list from column data within a CSV file based on key column.How do I use the MapCSVGen Generator?
MapCSVManualDistGenLoads key/value pair into map from column data present in the CSV file and finds the closest key based on referenced value.Not Currently Available
MultiKeyMapCSVGenGenerates data as a result of mapping multiple keys generated from a set of Attributes to values from a CSV file matching those keys in a CSV file.Not Currently Available
CSVChildToMapGenReads data from one or more columns in a CSV file.Not Currently Available
CSVChildFromMapGenReads the value of a particular column by Column Name from the result of CSVChildToMapGen Generator. Not Currently Available
CSVMapIndexGenReads data from CSV file and creates Index Map. The CSVMapIndexOffsetIndexGen Generator uses the Index Map to find the offset index value. Not Currently Available
CSVMapIndexOffsetIndexGenReturns the Offset Index value from Index Map, managed by the CSVMapIndexGen Generator. Not Currently Available
PermutationCSVGenLoads a list of values from a CSV file. Then it communicates with other Attributes within the same Domain, using a Permutation type Generator to compute the sum of all possible permutations. Not Currently Available
EvalCaseSentenceCSVGenEmulates multiple if-then-else cases by returning the first true value and loading the Subject, Predicates, and Clause from a CSV file to make sentences.How do I use the EvalCaseSentenceCSVGen Generator?
SentenceCSVGenLoads the Subject, Predicates, and Clause from a CSV file to make sentences.How do I use the SentenceCSVGen Generator?
MultiWeightCSVGenAllows multiple values to have weighting to determine how often each value is generated. Values and their respective weights are read from the delimited file at runtime.How do I use the MultiWeightCSVGen Generator?
ListSwitchCSVGenReads metadata from a CSV file to map multiple ListGen Generators into memory via a key. The key allows it to switch between ListGen Generators.Not Currently Available
MultiWeightSwitchCSVGenReads metadata from a CSV file to map multiple MultiWeightGen Generators into memory via a key. The kay allows it to switch between multiple MultiWeightGen Generators.How do I use the MultiWeightSwitchCSVGen Generator?
MultiWeightDateSwitchCSVGenReads metadata from a CSV file to map multiple MultiWeightDateGen Generators into memory via a key. The kay allows it to switch between multiple MultiWeightDateGen Generators.Not Currently Available
PartitionCntxtMap
RandomChildSwitchCSVGen
Reads metadata from a CSV file to map multiple MeanRandomNumberDistGen Generators into memory via a key. The key allows it to switch between multiple MeanRandomNumberDistGen Generators. Not Currently Available
PercentCalcSwitchCSVGenReads metadata from a CSV file to map multiple PercentCalcGen Generators into memory via a key. The key is used to switch between multiple PercentCalcGen Generators.Not Currently Available
RandomNumbDistSwitchCSVGenReads metadata from a CSV file to map multiple RandomNumbDistGen Generators into memory via a key. The key is used to switch between multiple RandomNumbDistGen Generators.Not Currently Available
RandomNumberSwitchCSVGenReads metadata from a CSV file to map multiple RandomGen Generators into memory via a key. The key is used to switch between multiple RandomGen Generators.Not Currently Available



Excel File Query Generators

The following Query Generators can be used to query data within Excel files. Please note that Excel queries are generally slower than CSV queries. 

Generator Name

Description

Additional Reading

ListExcelGenLoads its list from the column data within an Excel file.Not Currently Available
ExcelToMapGenReads data from one or more columns from an Excel file.How do I use the ExcelToMapGen and ExcelFromMapGen Generators?
ExcelFromMapGenReads the value of a particular column by Column Name from the result of ExcelToMapGen.How do I use the ExcelToMapGen and ExcelFromMapGen Generators?
ExcelChildToMapGenRead data from one or more columns from an Excel file.Not Currently Available
ExcelChildFromMapGenReads the value of a particular column from the result of ExcelToMapGen.Not Currently Available
MapExcelGenReads data from Excel Spreadsheet and returns the first matched value from the column provided in the valueColumn parameter.Not Currently Available
MapExcelChildGenReads data from Excel Spreadsheet and creates Map again on every Child Domain iteration and returns the matched value from the column provided in valueColumn parameter.How do I use the MapExcelChildGen Generator?



Salesforce Query Generators

The following Query Generators can be used to query data within Salesforce objects. 
 

Generator Name

Description

Additional Reading

SFQueryGenQuery a column of data from a Salesforce object. The query takes place in real time via a Salesforce REST web service call.How do I use the SFQueryGen Generator?
SFQueryEachLoopGenQuery a column of data from a Salesforce object on each iteration. The query takes place in real time via a Salesforce REST web service call.How do I use the SFQueryEachLoopGen Generator?
SFPickListGen

Query a Salesforce object description for a given fieldName, and if its Type is equal to picklist, it will read the picklist Values as its set of values to generate. 

How do I use the SFPickListGen Generator?



Other Query Generators

Additional Query Generators available for querying data:
 

Generator Name

Description

Additional Reading

PermutationQueryGen
Queries a list of values used with other Permutation Generators to compute a sum of permutations. It will generate all possible combinations of data for a given set of values queried from a set column within a database.
How do I use the PermutationQueryGen?