Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
i am trying to replace null values by a value in RAU field as 'Unknown', by creating a new modified field apart from existing RAU field,after doing a left join.
below is the sample script i have added,
ASA:
LOAD * INLINE [
ID, filename
1, Test1
2, Test2
3, Test4
4, Test5
5, Test6
6, Test7
7, Test8
8, Test9
9, Test10
10, Test11
];
left join
CSA:
LOAD * INLINE [
ID, RAU
1, alpha
2, beta
3, gamma
4, delta
];
the output i am looking for is
id RAU_modified
1 alpa
2 beta
3 gamma
4 delta
5 Unknown
6 Unknown
7 Unknown
8 Unknown
9 Unknown
10 Unknown
Thanks for the help !!
Try this script:
ASA:
LOAD * INLINE [
ID, filename
1, Test1
2, Test2
3, Test4
4, Test5
5, Test6
6, Test7
7, Test8
8, Test9
9, Test10
10, Test11
];
Left Join (ASA)
CSA:
LOAD * INLINE [
ID, RAU
1, alpha
2, beta
3, gamma
4, delta
];
NewASA:
NoConcatenate
LOAD ID,
filename,
If(Len(Trim(RAU)) = 0, 'Unknown', RAU) as RAU
Resident ASA;
DROP Table ASA;
Output in a table box:
Try this script:
ASA:
LOAD * INLINE [
ID, filename
1, Test1
2, Test2
3, Test4
4, Test5
5, Test6
6, Test7
7, Test8
8, Test9
9, Test10
10, Test11
];
Left Join (ASA)
CSA:
LOAD * INLINE [
ID, RAU
1, alpha
2, beta
3, gamma
4, delta
];
NewASA:
NoConcatenate
LOAD ID,
filename,
If(Len(Trim(RAU)) = 0, 'Unknown', RAU) as RAU
Resident ASA;
DROP Table ASA;
Output in a table box:
Thanks SunIndia the solution worked.
No problem
I am glad it worked
Best,
Sunny
hope this helps u in some cases
Thank u
Suresh