dataMapper (DataMapper)

Takes a jsFunc which is called once on each item in the stream. Once each item has been mapped through a new collection is made up of all the return values of the jsFunc and that collection is passed downstream.

Class names

scala: code.model.flows.processors.utils.DataMapperProcessorScannable
javascript: code_model_flows_processors_utils_DataMapperProcessorScannable

Aliases

mapper, dataMapper

Input type

scala.Nothing

Output type

code.data.Datum

Config

{"bindingHint":"Maps through the collection of input Data and generates one instance of output Data per input element based on the JsFunc provided.","categories":[{"defaultCollapsed":true,"fields":["testData","testDataTransformFunc","assertionFunc"],"name":"Testing"}],"fieldName":"dataMapper","fields":[{"default":null,"fieldName":"dataMapper.name","hidden":false,"hideLabel":false,"name":"name","readonly":false,"renderStrategies":[],"type":"S","validators":[]},{"default":"dataMapper","fieldName":"dataMapper.classPath","hidden":false,"hideLabel":false,"name":"classPath","readonly":false,"renderStrategies":[],"type":"S","validators":[]},{"default":null,"fieldName":"dataMapper.testDataTransformFunc","hidden":false,"hideLabel":false,"name":"testDataTransformFunc","readonly":false,"renderStrategies":[],"type":"Js","validators":[]},{"default":"T1726099538928_F16393798638731U5ZAJ","fieldName":"dataMapper.id","hidden":false,"hideLabel":false,"name":"id","readonly":false,"renderStrategies":[],"type":"S","validators":[]},{"default":null,"fieldName":"dataMapper.testData","hidden":false,"hideLabel":false,"name":"testData","readonly":false,"renderStrategies":[],"type":"Jv","validators":[]},{"default":null,"fieldName":"dataMapper.assertionFunc","hidden":false,"hideLabel":false,"name":"assertionFunc","readonly":false,"renderStrategies":[],"type":"Js","validators":[]},{"bindingHint":"A Javascript function that will define how the data is processed. A single item should be returned, this processor will run once per item in the stream and the items returned will be joined into a single collection to be passed on to the next step.","default":"return item;","fieldName":"dataMapper.jsFunc","hidden":false,"hideLabel":false,"label":"jsFunc","name":"jsFunc","prefix":"function(item,payload){\n","readonly":false,"renderStrategies":[],"suffix":"\n}","type":"Js","validators":[]}],"hidden":false,"hideLabel":false,"label":"dataMapper","name":"dataMapper","readonly":false,"renderStrategies":[],"type":"O"}