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:
- Create File Source activity.
- Create text schema activity corresponding to data file.
- 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.
- 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.
- 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 Service” in the developer guide.
- Write this stream into a Temporary File using file target activity.
- 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.
- Create another text schema for validate the target file data with uncheck the Data Header Present option.
- Create File Target activity.
For more help to design process flow refer to the screenshot below:
Comments
0 comments
Article is closed for comments.