Home Page › Forums › BizTalk 2004 – BizTalk 2010 › FlatFile has variable number of rows per record
- This topic has 2 replies, 1 voice, and was last updated 9 years, 2 months ago by
community-content.
-
AuthorPosts
-
-
February 1, 2006 at 7:01 PM #12786
Hi, I’ve got an incoming flatfile that has thousands of records. The problem I am having is each record’s last field may have more than one row of data.
Each record is seperated by a blank line
Each field is on their own line, except for the last field. The last field may have 1 or more lines to it.
Any help is appreciated, I have been struggling with this for some time.
Here is an example of 3 records
[quote:a22393e191]2005-06-21T00:00:00
1033
LA
UDF1
UDF2
BEBDC112-0645-4475-9920-F6D697C7D912
26EFBE74-44D5-4472-8719-34ED6F617C22
84BC4D4B-768E-4AED-B8CE-5E2FB63A7415
One line last field2005-06-21T00:00:00
1034
AB
UDF1
UDF2
BEBDC112-0645-4475-9920-F6D697C7D912
26EFBE74-44D5-4472-8719-34ED6F617C22
84BC4D4B-768E-4AED-B8CE-5E2FB63A7415
One line last field
Two line last field2005-06-21T00:00:00
1035
XX
UDF1
UDF2
BEBDC112-0645-4475-9920-F6D697C7D912
26EFBE74-44D5-4472-8719-34ED6F617C22
84BC4D4B-768E-4AED-B8CE-5E2FB63A7415
One line Last field
Two line last field
Three line last field
Four line last field
…
n line last field
[/quote:a22393e191]Thanks
Scott
-
February 3, 2006 at 3:46 PM #12787
HI,
I tried in my system… With record delimter 0x0D 0x0A postfix and Last field max Occur = unbounded.
<Schema>
<Root>
<reords> Set 0x0D 0x0A here and min occur = 0 n max occur = unbounded
field1
field2
field3
field 4 min occ = 0 n max unboundedIn ur case each record and each element is delimited by 0x0D 0x0A, I have to use the Tag Identifier property to distinguish each record.
As I have onbserved that 2005- … is the start of each record so I set this as Tag Identifier. But If u used this, you will loose the value that u specified in tag identifier property.
Cheers
-
February 2, 2006 at 12:35 AM #12788
This is quite tricky, the problem is discerning the end of each record.
One thing I noticed is your in example each field was terminated by: space\\r\\n while the blank line was just \\r\\nI had some success with this structure
Root child delimter 0x0D 0x0A Postfix
Record child delimter 0x20 0x0D 0x0A Postfix
Field1
…..
LastField maxOccurs = *
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.