Flat File Line Splitting
Here are instructions on how to have BizTalk split lines from a flat file into individual messages.
- Create a Flat File Schema and name the root node File (which is poorly named, it should be called Message) and make it post fix delimited with Carriage Return Line Feed (Hex 0×0d 0×0a) as the delimiter
- Create the line as a comma delimited record and add the elements in the line
- Create the pipeline using the schema that was just created
- Deploy the solution
- Set up the Ports as follows:
- Input Port: Name it, Create a recieve location using *.txt as the input pattern and the newly created pipeline
- Output Port: Name it, create the output path as %MessageID%.xml as the output pattern, on filters: Set BTS.ReceivePortName as what is created for the input port
- Start the Output Port
- Enable the recieve location
- Drop the sample file located in this sample solution
Eric,
Naming the root node as File is a bit misleading, Message would be more appropriate.
This schema describes the single line message generated from a multi-line file.
It would be good to point out the MaxOccurs and minOccurs properties on Line should left at the default of not specified or both set to 1.
Comment by Greg4 — May 24, 2006 @ 2:52 am
Yes you are right, naming the root file is a bit decieving.
Also correct is the fact that the min and max occurs is set to 1 on the line.
Comment by eric — May 24, 2006 @ 5:32 am