Generators¶
Generators are hooks that produce input data for QaaS.Runner Sessions. Before the act phase begins, the Runner calls each configured generator to populate the DataSources that sessions consume during Publishers and Transactions.
The QaaS.Common.Generators NuGet package ships the built-in generator library. You can author custom generators by implementing BaseGenerator<TConfig> from QaaS.Framework.SDK.
| Package | QaaS.Common.Generators |
| Source | QaaS.Common.Generators |
| Depends on | QaaS.Framework.SDK |
Installation¶
Writing a Custom Generator¶
See the Write Hooks guide for a step-by-step walkthrough.
Available Hooks¶
The built-in hooks below are grouped by usage area so it is easier to shortlist the right hook before drilling into configuration details.
External sources¶
- FromCSV: Reads CSV files from the configured file-system path and turns each row into generated data items.
- FromDataLake: Retrieves rows from the configured data lake query and exposes each row as a generated JSON object.
- FromFileSystem: Retrieves data from files under a configured path in the local file system.
- LettuceFromFileSystem: Retrieves lettuce-formatted files from the configured file-system path and exposes them as generated messages with their routing key metadata.
- FromS3: Retrieves data from objects in a configured S3 bucket and prefix.
Existing data sources¶
- FromDataSources: Generates data from the enumerable of data sources it receives
- FromLettuceDataSources: Generates data from the enumerable of data sources it receives that is in
Lettucefile format, presumes all items in the enumerable are deserialized into Json - FromSessionDataDataSources: Generates data from the enumerable of data sources it receives, presumes all items in the enumerable are serialized and can be treated as a byte array
- Stacking: Combines multiple data sources by taking a configured number of items from each source in turn.
Structured payloads¶
- Json: Generates JSON data from a configured prototype document.
- JsonSchemaDraft4: Generates JSON data that conforms to a configured JSON Schema Draft 4 document.