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 ]
|