BizTalk Gurus

is this mapping question any clearer?

rated by 0 users
Not Answered This post has 0 verified answers | 3 Replies | 2 Followers

Top 150 Contributor
10 Posts
Frank Castle posted on Thu, Jan 14 2010 12:18 PM

I have a source schema that can have 1-4 PID segments.  However, I need my output to create 4 output records regardless of how many PID's there are.  How can I simulate more source iterations then there actually are? 

source schema looks like:

PID
  rec1desc
/PID
PID
  rec2desc
/PID

target looks like

rec1
   tag1  (TAGS ARE HARDCODED)
   outputfield1
/rec1
rec2
   tag2  (TAGS ARE HARDCODED)
   outputfield2
/rec2
rec3
   tag3  (TAGS ARE HARDCODED)
   outputfield3
/rec3
rec4
   tag4  (TAGS ARE HARDCODED)
   outputfield4
/rec4

if input data looks like (notice only 2 records here)

pid
   testing1
/pid
pid
   testing2
/pid

then I need output to look like this:(notice the first value in this .csv output was the hardcoded tag value)

Description 1,testing1
Description 2,testing2
Description 3,
Description 4,

the final output file is positional by row so that is exactly why I need this many records generated.  even though there were only two records, the last two just have empty values.

All Replies

Top 10 Contributor
239 Posts
xman71 replied on Thu, Jan 14 2010 2:48 PM

Hi Frank,

 

   I have a solution in mind for you, the only thing is that using your input data above, the target schema will not show the elements outputfield3 and outputfield4 (but still have Description 3 and Description 4 in the data).

   I have the schemas, map and XML files (for testing) in a zipped file but can't post it here in the forums. If you are interested in it, go to my profile and you can download that zipped file from there and incorporate those artifacts in your own project...

 

    Daniel.

 

"Google skills are more important than your coding skills."

replied on Mon, Jan 18 2010 7:53 AM

Thank you for your response.  I have downloaded what I believe you have set up for me and will take a look at it and post a response regardless.  I sure appreciate you taking time on this.

 

FC

replied on Mon, Jan 18 2010 8:21 AM

Great, this solution worked perfectly.  I had exactly this solution mapped with one glaring difference and that was not using the flattening value mapper. 

 

Once again, I thank you for your help.

FC

Page 1 of 1 (4 items) | RSS