BizTalk Server General - Map multiple records flatfile to another flatfile - only last record being mapped

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > August 2004 > Map multiple records flatfile to another flatfile - only last record being mapped





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

2004-08-24, 6: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\SchemaResolverSample\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.
Justin Drerup

2004-08-25, 5: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@posting.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\SchemaResolverSample\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.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com