Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, please help me. I have a column as follows:
APN |
---|
inet |
static |
cvpn |
I need to rename it from 'inet' to 'resident', from 'static' to 'corporate' and from 'cvpn' to 'test'. How can I do this please? Thank you very much.
Hello Peter,
Open script editor and replace APN field with below given expression:
if(APN = 'inet', 'resident', if(APN = 'static', 'corporate', if(APN = 'cvpn', 'test', APN))) AS APN
Regards!
Rahul
If this is a Field and not a calculated dimension then in your load script create a mapping table before you load the field.
Something like
APN_Map:
mapping
Load * inline [
mapfrom, mapto
inet, resident
static, corporate
cvpn, test
];
Then when you are loading the APN field use
applymap('APN_Map',APN) as APN
t1:
LOAD * INLINE [
APN
inet
static
cvpn
];
NoConcatenate
load *,
if(WildMatch(APN,'inet'),'resident' ,
if(WildMatch(APN,'static'),'corporate',
if(WildMatch(APN, 'cvpn'),'test'))) as APN1
Resident t1;
drop Table t1;
Hello Peter,
Open script editor and replace APN field with below given expression:
if(APN = 'inet', 'resident', if(APN = 'static', 'corporate', if(APN = 'cvpn', 'test', APN))) AS APN
Regards!
Rahul