Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have this this values in a database .
Denied
Deny
Paid
Pay
Reverse
Rev
I want to convert Deny to Denied, Pay to Paid and Rev to Reverse so their information merge with their respective correct value. Any idea will be greatly appreciated.
Thanks
I would also suggest a MAPPING approach.
It's also explained here:
May be like this using a mapping load:
MappingTable:
Mapping
LOAD * Inline [
Name, NormalizedName
Deny, Denied
Pay, Paid
Rev, Reverse
];
Fact:
LOAD allOtherFields,
ApplyMap('MappingTable', FieldName) as FieldName
FROM Source;
Or you can do this using Match:
Pick(Match(FieldName, 'Deny', 'Pay', 'Rev') + 1, FieldName, 'Denied', 'Paid', 'Reverse') as FieldName
define a mapping table and use applymap
example:
TEST:
mapping
load * Inline [
In, Out
Deny, Denied
Pay, Paid
Rev, Reverse
];
ORIG:
Load * Inline [
Inp
Denied
Deny
Paid
Pay
Reverse
Rev
];
NEW:
Load Inp,
applymap('TEST', Inp) as Outp
resident ORIG;
]
I tried to cover all my bases this time
Damn it!
I though I did cover all my bases, but guess not
But Really Helpful. Thanks!!!