Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends,
I'm using apply map function for my requirement. Apply map has been applied perfectly.
I'm taking field from table 1 through apply map.
I need to do calculation of this fields at table 2.
SUM(TRIM(ApplyMap('Pol_DISC_MAP',TP_BI_ID,Null()))POL_DISC_LC_1)/COUNT(DISTINCT TR_RISK_SR_NO) as RISK_DISC_LC_1,
Is this possible to do like above in another way because the above logic is throwing error.
Please anyone suggest me.
Regards
Krishna
Hi Krishna,
Can you post an small example of what you are trying to do?
What you are doing will not work because POL_DISC_LC_A is directly after the brackets which is wrong syntax, also you want to take sum of something that is a string.
thanks,
Rajesh Vaswani
Are you missing an operator before POL_DISC_LC_1?
What exactly your Map table is going to return ? If going to return some numbers then there should be mathematical operations before POL_DISC_LC_1
SUM(TRIM(ApplyMap('Pol_DISC_MAP',TP_BI_ID,Null()))POL_DISC_LC_1)/COUNT(DISTINCT TR_RISK_SR_NO) as RISK_DISC_LC_1,
Hi All
Please find the sample file.
My apply map field need to return the amount field from table 1 and it will be taken as sum in the Table 2.
Here the total sum should be divided by the count(TR_RISK_SR_NO).
I will suggest you,
first do only applymap
ApplyMap('Pol_DISC_MAP',TP_BI_ID,Null()))POL_DISC_LC_1) as colname
then in preceding load or in resident load do other calculation.
do you use any group by function in load for aggregation ?
Thanks
BKC
Hi Bala,
Yes i tried before as you told.In this situation, my table fields will repeat thrice because of using group By function.
In preceding load we need to load all fields and need to repeat at Group By.
As usual Table Load 1 time.
if you want to load aggregated table then definitely you need to include all the fields in group by.
for preceding load you can have
load *,
sum(col name)
or you can do resident load and drop the original table.
Thanks
BKC