Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm trying to create a flag to my following sample data set.
ID | Name |
A | 100_2000 |
B | 32498762134_43874 |
C | 46387_47398 |
D | 12 |
E | 20 |
In my Name filed, '_' separates the values.
I'm trying to create a flag for IDs A,B, and C as it has 2 values.
can someone please help?
Any help is highly appreciated.
like this?
Test:
LOAD * Inline
[
ID,Name
A,100_2000
B,32498762134_43874
C,46387_47398
D,12
E,20
];
NoConcatenate
Test2:
LOAD
ID,
if(index(Name,'_')>0,1,0)as Flag
Resident Test;
DROP Table Test;
like this?
Test:
LOAD * Inline
[
ID,Name
A,100_2000
B,32498762134_43874
C,46387_47398
D,12
E,20
];
NoConcatenate
Test2:
LOAD
ID,
if(index(Name,'_')>0,1,0)as Flag
Resident Test;
DROP Table Test;
Thanks a lot Robert!