Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
ID | order | Rate | value |
ID1 | R | usd | 1000 |
ID1 | S | eur | 200 |
When I am trying to perform Concat(order,'/') as neworder in the edit script:
The excepted result should be R/S and usd/eur as output in the table box instead it shows R/S but eur/usd
Can you anyone help on this! As per the sort order i guess it is showing eur first instead of usd even though usd is mapped to R
I am not understanding what to put in sort weight which is an extra parameter in Concat.
Appreciate your help in advance!
Thanks,
S
Hi,
Try like this
Temp:
LOAD
*,
RowNo() AS RowNum
INLINE [
ID, order, Rate, value
ID1, R, usd, 1000
ID1, S, eur, 200];
Data:
NoConcatenate
LOAD
ID,
Concat(order, '/', RowNum) AS order,
Concat(Rate, '/', RowNum) AS Rate,
Concat(value, '/', RowNum) AS value
RESIDENT Temp
GROUP BY ID;
DROP TABLE Temp;
Regards,
Jagan.
go to your table box properties-> Sort
Promote order to first and Rate in second position. (Select both sort order condition based on Text A->Z)
The output itself is eur/usd but the expected output should be usd/eur which is never coming as the result!
While doing concat in edit script do the order by .Other way is you can assign concat to any number type field by using dual function in script Dual(Concat(order,'/'),Value) as ConcatFieldname.Sort the concat field by Value field in any object
Hi,
Try like this
Temp:
LOAD
*,
RowNo() AS RowNum
INLINE [
ID, order, Rate, value
ID1, R, usd, 1000
ID1, S, eur, 200];
Data:
NoConcatenate
LOAD
ID,
Concat(order, '/', RowNum) AS order,
Concat(Rate, '/', RowNum) AS Rate,
Concat(value, '/', RowNum) AS value
RESIDENT Temp
GROUP BY ID;
DROP TABLE Temp;
Regards,
Jagan.
Just use:
Concat(order,'/', order)
Concat(Rate, '/', order)