Generating output records based on input fields

Usually, in the Data Mapping stage you will employ a “one record in to one record out” scenario by implementing a “for each” on the “Record” node. In some cases, you may wish to produce multiple output records when an input field meets a certain criteria.

Below are the steps to generate more than one output record from a data mapping based on the content contained in one of the input field:

  1. Create File Source activity.
  2. Create text schema activity corresponding to data file.
  3. Use record queue producer and receiver activity in process flow for processing the records one by one. To read more about queue producer and receiver go to “Home>Working with Process Flow>Processing Record Queue” in the developer guide.
  4. Use Repeater service in process flow to send the above stream to Record to Record activity and data mapping activity. To read more about Repeater service go to “Home>Working with Process Flow>Using Repeater Node” in the developer guide.
  5. Write a script for creating empty records by using Record to Record activity. To read more about Record to Record Service go to “Home>Transforming Data>Using Record To Record Servicein the developer guide.
  6. Write this stream into a Temporary File using file target activity.
  7. Create a data mapping activity and load source and target text schema. Create a local variable on root level and use “FilePath-XPath” function for getting XPath of temporary file. To read more about Axis function go to “Home>Transforming Data> Using Data Mapper>Using Data Mapping Function>Using Axis Function” in the developer guide. Apply for-each at record node using this variable.
  8. Create another text schema for validate the target file data with uncheck the Data Header Present option.
  9. Create File Target activity.


For more help to design process flow refer to the screenshot below:


Have more questions? Submit a request


Article is closed for comments.