Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All
I have a field named
"Summary_Text"
with data as follow
[SP] - Factory 4545 |
[BF] - Error during Loadin |
[IN] - Installation start fine |
I need to create a new Field "Charge_Type" according to the text I have into the Bracket
[SP] ==> will be Site_prep
[BF] ==> will be Brake_Fix
[IN] ==> will be Installation
Thanks
Franck
Hi,
Try:
LOAD if(TextBetween(SUMMARY_TEXT,'[',']')='SP','Site_prep',
if(TextBetween(SUMMARY_TEXT,'[',']')='BF','Brake_Fix',
if(TextBetween(SUMMARY_TEXT,'[',']')='IN','Installation'))) as Charge_Type;
SELECT SUMMARY_TEXT
from ....
BR
Ariel
Try a mapping of your field values, like this:
TextMap:
MAPPING LOAD * INLINE [
Abb, Type
SP, Site_prep
BF, Brake_Fix
IN, Installation
];
LOAD
Summary_Text,
ApplyMap('TextMap', TextBetween(Summary_Text,'[',']') ) as Charge_Type,
...
FROM ...;
better then my suggestion....
Thanks To you , Ariel and Swuel
I am trying it
Again thanks
Both way working, I learned from both of you .
BIG THANK