Positional Flat File Parsing
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Applications Integration > Positional Flat File Parsing




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Positional Flat File Parsing  
Sandeep Nair


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-06-04 10:49 PM

Hi,

I have the following requirement -

I have a positional text file that looks like this -

HI001AddressName - { Header }
DDate00100020007 - {Detail Record for the Header above}

I have defined a schema for the header and another schema for the detail in
Biztalk 2004.
What i need to do is this - i have to map the data from the source file to a
destination schema. The destination schema requires data from both the heade
r
as well as the detail.
I have also defined the destination schema. I have defined 2 maps - one for
the header and one for the detail (so that i can map the respective fields t
o
the destination)
In my receive pipeline, i specify the document schema = Detail schema and
Header Schema = Header schema.
I also have a receive and send port. In the send port, under the 'Filters &
Maps' i am able to specify both my header and detail map. But when the
destination XML file is created, i am seeing that only data from the Detail
part of the source file is being used. The interface is completely ignoring
the data from the header.

Any idea why this could be happening?

Thanks and regards,

Sandeep.





[ Post a follow-up to this message ]



    Re: Positional Flat File Parsing  
Nabeel Prior


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-08-04 10:48 PM

Hi Sandeep,
By my understanding, using the header option in the flat file parsing
is for stripping the header from the body the file you want to
further process.  You can promote properties on this header for use
later in an orchestration / filtering, but once it has been stripped
from the document it is no longer a document in its own right.

It sounds like you should rather be creating one document schema that
contains a header record (occurs once) and a detail record (occurs
many times).  In your mapper you would then have the header record
and detail record(s) available in the mapping process.

I am not sure if this will satisfy your particular requirements?

Kind Regards,

Nabeel Prior

2004/10/07 00:39:04
Sandeep Nair <"Sandeep Nair"@discussions.microsoft.com> wrote in
message
<82946F0C-4250-46AF-BF27-85088D865A41@microsoft.com>

> Hi,
>
> I have the following requirement -
>
> I have a positional text file that looks like this -
>
> HI001AddressName - { Header }
> DDate00100020007 - {Detail Record for the Header above}
>
> I have defined a schema for the header and another schema for the
detail in
> Biztalk 2004.
> What i need to do is this - i have to map the data from the source
file to a
> destination schema. The destination schema requires data from both
the header
> as well as the detail.
> I have also defined the destination schema. I have defined 2 maps -
one for
> the header and one for the detail (so that i can map the respective
fields to
> the destination)
> In my receive pipeline, i specify the document schema = Detail
schema and
> Header Schema = Header schema.
> I also have a receive and send port. In the send port, under the
'Filters &
> Maps' i am able to specify both my header and detail map. But when
the
> destination XML file is created, i am seeing that only data from
the Detail
> part of the source file is being used. The interface is completely
ignoring
> the data from the header.
>
> Any idea why this could be happening?
>
> Thanks and regards,
>
> Sandeep.





[ Post a follow-up to this message ]



    Re: Positional Flat File Parsing  
Sandeep


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-08-04 10:48 PM

Hi Nabeel,

I greatly appreciate your response. I actually already stared on the second
approach u mentioned. And now the file is parsing well. Thanks so much!
Just one more on the same note - Is there a way to tell the disassembler
that the data in the tex file is related? i mean there could be one header
record having multiple corresponding detail records. When the target instanc
e
is created, the header and detail records much be together.
The file has a format like this -
HDRN1001.................
HDRL1002.................
DTLN1001................. (Detail record for HDRN1001)
DTLN1001.................. (2nd Detail for HDRN1001)
DTLL1002..................(Detail for HDRL1002..) ...and so on....

Any ideas on this?

Thanks and Regards,

Sandeep.

"Nabeel Prior" wrote:

> Hi Sandeep,
> By my understanding, using the header option in the flat file parsing
> is for stripping the header from the body the file you want to
> further process.  You can promote properties on this header for use
> later in an orchestration / filtering, but once it has been stripped
> from the document it is no longer a document in its own right.
>
> It sounds like you should rather be creating one document schema that
> contains a header record (occurs once) and a detail record (occurs
> many times).  In your mapper you would then have the header record
> and detail record(s) available in the mapping process.
>
> I am not sure if this will satisfy your particular requirements?
>
> Kind Regards,
>
> Nabeel Prior
>
> 2004/10/07 00:39:04
> Sandeep Nair <"Sandeep Nair"@discussions.microsoft.com> wrote in
> message
> <82946F0C-4250-46AF-BF27-85088D865A41@microsoft.com>
> 
> detail in 
> file to a 
> the header 
> one for 
> fields to 
> schema and 
> 'Filters & 
> the 
> the Detail 
> ignoring 
>





[ Post a follow-up to this message ]



    Re: Positional Flat File Parsing  
Tomas Restrepo \(MVP\)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-09-04 07:46 AM

Sandeep,

> I greatly appreciate your response. I actually already stared on the
second
> approach u mentioned. And now the file is parsing well. Thanks so much!
> Just one more on the same note - Is there a way to tell the disassembler
> that the data in the tex file is related? i mean there could be one header
> record having multiple corresponding detail records. When the target
instance
> is created, the header and detail records much be together.
> The file has a format like this -
> HDRN1001.................
> HDRL1002.................
> DTLN1001................. (Detail record for HDRN1001)
> DTLN1001.................. (2nd Detail for HDRN1001)
> DTLL1002..................(Detail for HDRL1002..) ...and so on....
>
> Any ideas on this?

Humm.... I imagine you'd like to have this nest the related records under
the corresponding header, right?

If so, sounds like the kind of thing that would be easier to do with a map
after parsing the original file, no?

--
Tomas Restrepo
tomasr@mvps.org







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:23 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register