简体   繁体   中英

BizTalk Flatfile Schema - Nested repeating records

I am trying to map a schema like this example, that has repeating records inside repeating records.

Sample File:

0000456Toy Industries56Palumbia DriveEnfield   CT06082  98724
302369097   King Toy Store20 Cherry WayDedhamMA02026  TS2349
402369097   036436 Playstation 4 Entert03452449.99  20140826
402369097   036437 Msoft XBOX ONEEntert01234399.99  20140826
402369097   036438 Wooden Horse        07892 59.99  20140827
402369097   036439 Playstation 4 Entert03452449.99  20140827
402369097   036440 My First Brew Kit    99.99  20140828
602369097000100010005I
302369235   Make Believe 342 Brand DriveBridgeMA02324  TS5439
402369235   054324 Playstation 4 Entert53452449.99  20140827
402369235   054325 Steam Box Ultimate  54234699.99  20140827
602369235000100010002I
900033336133310001    

Sequence:

<Processor Record> (one per file | 1)
    <Store Record> (one per store | 1+)
        <Order Record> (one for each order the store had | 1+)
    <Store Batch Control Record> (one per store | 1+)
<File Batch Control Record> (one per file | 1)

Each Record (line) will be broken into field elements by positional specifications

I have tried using the wizard a couple of times and manually adjusting the settings as well, but keep running into issues like this one:

The current definition being parsed is Root. The stream offset where the error occurred is 0. The line number where the error occurred is 1. The column where the error occurred is 0.

I am rather new to BizTalk and was hoping that someone may be able to give me some help on how to accomplish this task. Thanks!

Use the Tag Identifiers to indicate the type of record.

In your case, this would be:

00 Processor Record Header
30 Store Record Header
40 Order Record
60 Store Record Summary
90 Processor Record Summary

This is how I would do it:

You would have a root node with the following parameters:

Structure: delimited
Child Delimiter Type: hexadecimal
Child delimiter: 0x0a 0x0d (newline character of your choice)
Child Order: Infix

The node below that would be the "Header" node.

It's properties:

Max Occurs: 1
Min Occurs: 1
Structure: positional
Tag Identifier: 00

The next node would be the "Store" node. This is an abstract node, just to be able to capture a store header, a recurring order record and a store summary node.

It's properties:

Max Occurs: *
Min Occurs: 0 (depending what's possible on your flat file)
Structure: delimited
Child Delimiter Type: hexadecimal
Child delimiter: 0x0a 0x0d (newline character of your choice)
Child Order: Infix

The node below that would be the "StoreHeader" node.

Max Occurs: 1
Min Occurs: 0 (depending what's possible on your flat file)
Structure: positional (only you know the exact sequence of fields)
Tag Identifier: 30

Next to that, the "Order" node:

Max Occurs: *
Min Occurs: 0 (depending what's possible on your flat file)
Structure: positional (only you know the exact sequence of fields)
Tag Identifier: 40

Next to that, the "StoreSummary" node:

Max Occurs: 1
Min Occurs: 0 (depending what's possible on your flat file)
Structure: positional (only you know the exact sequence of fields)
Tag Identifier: 60

At last, at the same level as the "Header" and "Store" nodes, you would have the "Summary" node:

Max Occurs: 1
Min Occurs: 1
Structure: positional
Tag Identifier: 90

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM