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