BizTalk Server General - Group Multiple record to Singe Mapping

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > December 2004 > Group Multiple record to Singe Mapping





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 Group Multiple record to Singe Mapping
Btvn

2004-11-11, 2:46 am

Hi All,

How do I map many source records to single target record
in mapping.

I have input/source file schema which has multiple
records of same type. I Need to transform it to a target schema which will
have
single record. Ofcourse few fields are to be picked up
from 1st record(or could be from any record as they are
same for all the records) as following:
<Root>
<Header String1="String1_0" String2="String2_1" />
<ARecordA String1="A1_Row1" String2="String2_1" />
<ARecordA String1="A2_Row1" String2="String2_1" />
<ARecordA String1="A3_Row1" String2="String2_1" />
<ARecordA String1="A1_Row2" String2="String2_1" />
<ARecordA String1="A2_Row2" String2="String2_1" />
<ARecordA String1="A3_Row2" String2="String2_1" />
<ARecordA String1="A1_Row3" String2="String2_1" />
<ARecordA String1="A2_Row3" String2="String2_1" />
<ARecordA String1="A3_Row3" String2="String2_1" />
<ARecordA String1="A1_Row4" String2="String2_1" />
<ARecordA String1="A2_Row4" String2="String2_1" />
<ARecordA String1="A3_Row4" String2="String2_1" />
<Trailer Trailer1="Trailer1_0" Trailer2="Trailer2_1" />
</Root>

And I want to receive output schema :
<Header String1="String1_0" String2="String2_1" >
<SemiHeader a="7" b="6">
<Records>
<Record A1="A1_Row1" A2="A2_Row1" A3="A3_Row1">
</Record>
<Record A1="A1_Row2" A2="A2_Row2" A3="A3_Row2">
</Record>
<Record A1="A1_Row3" A2="A2_Row3" A3="A3_Row3">
</Record>
<Record A1="A1_Row4" A2="A2_Row4" A3="A3_Row4">
</Record>
<SemiTotal a="7" b="6">
</Records>

I try to map it by using loop functiod, but this is my output schema :

<Records>
<Record A1="A1_Row1" A2="A2_Row1" A3="A3_Row1">
</Record>
<Record A1="A1_Row2" A2="A2_Row1" A3="A3_Row1">
</Record>
<Record A1="A1_Row3" A2="A2_Row1" A3="A3_Row1">
</Record>
<Record A1="A1_Row4" A2="A2_Row1" A3="A3_Row1">
</Record>
</Records>
I dont know how to map. Please help me to map it.

Thanks in advance and Best regard.

Tan Bao Nguyen

2004-12-22, 5:52 pm

Did you resovle the mapping problem? Note that the mapper doesn't support
grouping records. My suggestion is to use a Scripting functoid and write
some XSLT to do the mapping.

Regards,
Tan Nguyen
Microsoft BizTalk Server

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------[vbcol=seagreen]
will[vbcol=seagreen]

Btvn

2004-12-23, 7:46 am

I have not resolved this problem yet. Can you give me an example of grouping
records using XSLT because I'm new with XSLT.
Thanks for your helps

"Tan Bao Nguyen" wrote:

> Did you resovle the mapping problem? Note that the mapper doesn't support
> grouping records. My suggestion is to use a Scripting functoid and write
> some XSLT to do the mapping.
>
> Regards,
> Tan Nguyen
> Microsoft BizTalk Server
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> --------------------
> will
>
>

Tan Bao Nguyen

2004-12-30, 5:52 pm

Take a look at the attached map. It contains a Scripting functoid that
will group the cities by countries.

Regards,
Tan Nguyen
Microsoft BizTalk Server

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------[vbcol=seagreen]
<yRziPOH6EHA.2768@cpmsftngxa10.phx.gbl>[vbcol=seagreen]
grouping[vbcol=seagreen]
support[vbcol=seagreen]
write[vbcol=seagreen]
rights.[vbcol=seagreen]
:[vbcol=seagreen]
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com