Skip to Content
0
Former Member
Jan 28, 2012 at 12:57 PM

mapping issue

24 Views

Hi PI Experts,

My source data is like this.

customer

--name

--order

-


id

-


amount

my target data is like this.

sales details

--customer details

-


name

-


total orders of customer

-


total amount of customer

--summary

-


total customers

-


total orders of customers

-


total amount of customers

my scenario is, if they are number of orders for a particular customer on the source side then the sum of all the amounts for that particular customer should be printed on the first node of the target side i.e 'total amount of customer' and if once again the same customer node is repeated on the source side then the 'total customers' on the target side should be taken as '1' and i should get the' total amount of all the customers' on the last node of the target data.

For example, if i had a

customer 'A' and he has 2 orders i.e " '101,1000' ", " '102,2000' "

customer 'B' and he has 3 orders i.e " '201,3000' ", " '202,4000' "

customer 'A' and he has 3 orders i.e " '301,100' ", " '302,200' ", " '303,300' "

so the output should be like this....

sales details

--customer details

-


name................................................'A'

-


total orders of customer..................'2'

-


total amount of customer.................'3000'

--customer details

-


name................................................'B'

-


total orders of customer..................'2'

-


total amount of customer.................'7000'

--customer details

-


name................................................'A'

-


total orders of customer..................'3'

-


total amount of customer.................'600'

--summary

-


total customers...............................'2'

-


total orders of customers...............'7'

-


total amount of customers..............'10,600'

Hope u understood my scenario..