Page 1 of 1

repeating elements

Posted: Fri Apr 15, 2011 12:48 pm
by Nagaraj
Hi Folks,

- <measure-group ID="X">
- <p1>
<C>Y</C>
<D />
<E />
- <p2>
<p2-number>ABC</p2-number>
<eligible-instances>16</eligible-instances>
<meets-performance-instances>28</meets-performance-instances>
<performance-rate xsi:nil="true" />
</p2>
</p1>
- <p1>
<C>Y</C>
<D>2011-04-01 00:00:00</D>
<E>2011-06-30 00:00:00</E>
- <p2>
<p2-number>EFG</p2-number>
<eligible-instances>1</eligible-instances>
<meets-performance-instances>2</meets-performance-instances>
<performance-rate xsi:nil="true" />
</p2>
</p1>

target xml output stage

target xml output stage

i am getting these elements repeated for all the rows

<C>Y</C>
<D>2011-04-01 00:00:00</D>
<E>2011-06-30 00:00:00</E>

i want the above to appear only once.

things i have done.

made this column <p2-number> as KEY.

aggreate all rows check boxed in target output stage.

Posted: Fri Apr 15, 2011 12:50 pm
by Nagaraj
And also

made the last element as XML

<performance-rate xsi:nil="true" />

Posted: Fri Apr 15, 2011 12:57 pm
by eostic
hard to tell, but it "looks" like p2 is your "inner" repeating group, and p1 is the "parent". ....and the C and D cols are desired to be at the "parent" level.

One would guess that the xpath for this looks something like:

.../p1/C/text()
.../p1/D/text()
.
.
.
.../p1/p2/p2_number/text()

etc.

Make sure the only "key" selected for this link is "inside" p2. ...such as P2 number.

Ernie

Posted: Fri Apr 15, 2011 1:07 pm
by Nagaraj
duplicate post

Posted: Fri Apr 15, 2011 1:09 pm
by Nagaraj
Ernie,

i was able to get this before, but with the new change, i am loosing this.

i made the last column as transformation to produce as
<performance-rate xsi:nil="true" />

Posted: Fri Apr 15, 2011 1:37 pm
by Nagaraj
duplicate post

Posted: Fri Apr 15, 2011 2:11 pm
by eostic
Not sure....but carefully check your incoming data. And run with a tiny number of input records that you are intimately familiar with.

I didn't have time to absorb all of your data values, but it "looks" like you want to have one set of repeating groups for the single combination of npi/tin numbers that are at the top....but...

...for the same npi/tin combination, your dates are different. Find out why. That may not be the issue, but it would certainly be something to dig into.

Ernie

Posted: Fri Apr 15, 2011 3:00 pm
by Nagaraj
ahh right
Not sure....but carefully check your incoming data. And run with a tiny number of input records that you are intimately familiar with.

I didn't have time to absorb all of your data values, but it "looks" like you want to have one set of repeating groups for the single combination of npi/tin numbers that are at the top....but...

...for the same npi/tin combination, your dates are different. Find out why. That may not be the issue, but it would certainly be something to dig into.
from your suggestion if found the issue is the repeating group, its a data issue,

thanks for your time ernie,

Posted: Fri Apr 15, 2011 3:05 pm
by eostic
No problem. Glad to be of help.....

..for anyone reading this, keep in mind that it's not just the syntax that will impact what your resulting document looks like. In this case there were "two" records at the higher level, so it had no choice but to cut another parent group.

Know your data.

Ernie

Posted: Fri Apr 15, 2011 7:44 pm
by Nagaraj
Yes i agree :) thanks ernie a lot. have a gr8 weekend.