Flat file is a very common method to transfer data from one system to another. We will learn the basic in how to use flat file as an inbound data and send to another system. In this example I will read the flat file and transform it into xml file and write into a folder. The sample flat file is shown as below. And I will use “|” as a delimiter between fields and new line as a delimiter between records.
You can start creating the BizTalk Project by following these steps.
1. Create a flat file schema.
2. Set the Root delimiter as new line characters “0x0D 0x0A”. Make sure the delimiter type is Hexadecimal.
3. Set the child delimiter as “|” and make sure the delimiter type is Character.
4. Create a Map and select the source schema and destination schema. In this sample they will be the same.
5. Map the source schema to destination schema.
6. Create an orchestration.
7. Create the receive port and port type. Choose the correct schema for receive port.
8. Create the receive message and send message and assign the correct schema.
9. Transform the received message into send message by using the map.
10. Create the send message object, send port and send port type. Assign the schema to the send port.
11. Set the Activate to True for Receive Message control.
12. Create a custom pipeline.
13. Deploy the project and create the Receive Ports, Receive Locations and Send Ports.
14. Drop the flat file into the folder which is assign to the receive port location and you will get the output file as shown in the figure in your send port location folder.