Map multiple records flatfile to another flatfile - only last record being mapped
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 General > Map multiple records flatfile to another flatfile - only last record being mapped




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

    Map multiple records flatfile to another flatfile - only last record being mapped  
Justin Drerup


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


 
08-24-04 11:59 PM

Hi, I'm having troubles mapping multiple records from one flat file to
another.

INPUT.CSV
Mr|Joe|Doe
Mr|Super|Man
Mr|Donald|Duck

I would like the output to look like this:

OUTPUT.CSV
Mr|Joe|Doe|Mr Joe Doe
Mr|Super|Man|Mr Super Man
Mr|Donald|Duck|Mr Donald Duck

I have created a receive and send pipeline which disassemble and
assemble the flatfiles into XML.

I have created input.xsd and output.xsd with flatfile extensions.

I have created the orchestration which calls a map and does a direct
map of the title to the title, firstname to the firstname, surname to
the surname and a string concatenate functoid to produce the full
name.

If I have a single record in INPUT.CSV then the output correctly
produces a the record however if I have multiple records within
INPUT.CSV, OUTPUT.CSV looks like this:

Mr|Joe|Doe
Mr|Super|Man
Mr|Donald|Duck|Mr Donald Duck

Only the last record contains the concatenated value.

I suspect it is something to do with the formation of my schema and I
believe I may not have created this correctly.  I based my schema on
the sample  \SDK\Samples\Pipelines\SchemaResolverCom
ponent\SchemaResolverSamp
le\SalesRequest.xsd
which is designed to work with a single record text file.

INPUT.XSD
Root (max-ocurs: unbounded, child-delimeter: |)
Title
Firstname
Surname


OUTPUT.XSD
Root (max-ocurs: unbounded, child-delimeter: |)
Title
Firstname
Surname
Fullname

My questions are:
* Are there any obvious problems with my approach?
* Should the XSD have an element structure more like:
Records
Record
Title
Firstname
Surname
Fullname

* Any good samples out there demonstrating how to work with multiple
records from a flatfile?

Thanks in advance for any help you might have.

PS I'm a BizTalk beginner.





[ Post a follow-up to this message ]



    Re: Map multiple records flatfile to another flatfile - only last record being mapped  
Justin Drerup


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


 
08-25-04 10:54 PM

It's ok - solved it.

Problem was with the format of my XSD - it didn't support multiple records.

j.drerup@syzygy.net (Justin Drerup) wrote in message news:<1b28db6c.0408240846.39f2b6bb@post
ing.google.com>...
> Hi, I'm having troubles mapping multiple records from one flat file to
> another.
>
> INPUT.CSV
> Mr|Joe|Doe
> Mr|Super|Man
> Mr|Donald|Duck
>
> I would like the output to look like this:
>
> OUTPUT.CSV
> Mr|Joe|Doe|Mr Joe Doe
> Mr|Super|Man|Mr Super Man
> Mr|Donald|Duck|Mr Donald Duck
>
> I have created a receive and send pipeline which disassemble and
> assemble the flatfiles into XML.
>
> I have created input.xsd and output.xsd with flatfile extensions.
>
> I have created the orchestration which calls a map and does a direct
> map of the title to the title, firstname to the firstname, surname to
> the surname and a string concatenate functoid to produce the full
> name.
>
> If I have a single record in INPUT.CSV then the output correctly
> produces a the record however if I have multiple records within
> INPUT.CSV, OUTPUT.CSV looks like this:
>
> Mr|Joe|Doe
> Mr|Super|Man
> Mr|Donald|Duck|Mr Donald Duck
>
> Only the last record contains the concatenated value.
>
> I suspect it is something to do with the formation of my schema and I
> believe I may not have created this correctly.  I based my schema on
> the sample  \SDK\Samples\Pipelines\SchemaResolverCom
ponent\SchemaResolverSa
mple\SalesRequest.xsd
> which is designed to work with a single record text file.
>
> INPUT.XSD
> Root (max-ocurs: unbounded, child-delimeter: |)
>   Title
>   Firstname
>   Surname
>
>
> OUTPUT.XSD
> Root (max-ocurs: unbounded, child-delimeter: |)
>   Title
>   Firstname
>   Surname
>   Fullname
>
> My questions are:
> * Are there any obvious problems with my approach?
> * Should the XSD have an element structure more like:
> Records
>   Record
>     Title
>     Firstname
>     Surname
>     Fullname
>
> * Any good samples out there demonstrating how to work with multiple
> records from a flatfile?
>
> Thanks in advance for any help you might have.
>
> PS I'm a BizTalk beginner.





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 04:17 AM.      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