|
Home > Archive > BizTalk Server General > December 2004 > Creating one File output for each input record
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Creating one File output for each input record
|
|
|
| Hi,
In BizTalk 2004, I am having a flat file with multiple records. I am
converting into xml file in pipleline using xml disassembler and the in the
port i am mapping to another xml file. This xml data goes into orchestration
for further processing.
In this case, i want to send the records one by one to orchestration. ie i
want to split multiple records in to single records. Where i have to do it
(in mapping?) and how to do that.
I heard that if it is an xml file, the we can do it using envelope. in this
case, it is flat file and multiple records.
Thanks
Senthil
| |
| Mike Watson 2004-12-02, 5:48 pm |
| Hi,
I spent sometime looking into this for a project that was working on a while
ago.
Unless someone else knows different, I could not find a simple ‘out of the
box’ solution. Even, as you mentioned, the envelope would not work for me
when reading in a flat file (XML no problem!!)….
Anyway, to cut a long story short, I wrote a very simple pipeline component,
using the IDisassemblerComponent interface. This enables you to split the
incoming document, in my case via a CR/LF delimiter, build a simple xml
document and then push the results to the messagebox one-by-one.
Take a look @ this link with regards to the interface methods…
http://msdn.microsoft.com/library/d...emberstopic.asp
Cheers,
Mike Watson
"Sents" wrote:
> Hi,
>
> In BizTalk 2004, I am having a flat file with multiple records. I am
> converting into xml file in pipleline using xml disassembler and the in the
> port i am mapping to another xml file. This xml data goes into orchestration
> for further processing.
>
> In this case, i want to send the records one by one to orchestration. ie i
> want to split multiple records in to single records. Where i have to do it
> (in mapping?) and how to do that.
>
> I heard that if it is an xml file, the we can do it using envelope. in this
> case, it is flat file and multiple records.
>
> Thanks
> Senthil
>
| |
| Greg Forsythe 2004-12-02, 5:48 pm |
| There are anumber of ways to do this depending on the layout of the flat
file
1. For a file of records
Rec|1234|field|field
Rec|1234|field|field
Rec|1234|field|field
Rec|1234|field|field
just declare the record in the schema with a maxoccurs = 1
2. If your file has a header/footer
Hdr|date|blah
Rec|1234|field|field
Rec|1234|field|field
Rec|1234|field|field
Ftr|count
You must declare a header schema, a record schema and a footer schema. Again
specify the record schema with a maxoccurs =1. The 3 schemas need to be set
on the flat file disassembler component in your pipeline.
3. More complicated
Hdr|date|blah
Doc|1234
Line|field|field
Line|field|field
Line|field|field
Doc|2345
Line|field|field
Line|field|field
Line|field|field
Ftr|count
Use the header/record/footer technique and specify the maxoccurs = 1 on the
Doc record to create a separate message for each document.
Hope this helps
Greg
"Sents" <Sents@discussions.microsoft.com> wrote in message
news:A4665D92-1F87-4EF6-83D7-F90EEF4BF9D7@microsoft.com...
> Hi,
>
> In BizTalk 2004, I am having a flat file with multiple records. I am
> converting into xml file in pipleline using xml disassembler and the in
the
> port i am mapping to another xml file. This xml data goes into
orchestration
> for further processing.
>
> In this case, i want to send the records one by one to orchestration. ie i
> want to split multiple records in to single records. Where i have to do it
> (in mapping?) and how to do that.
>
> I heard that if it is an xml file, the we can do it using envelope. in
this
> case, it is flat file and multiple records.
>
> Thanks
> Senthil
>
|
|
|
|
|