I want to split the string in a dataset that is joined by a backslash (/) into a new line.
The example datatset is:
(David Jones / John Smith)
I want the result to be:
(David Jones)
(John Smith)
The code i have written is:
A = FOREACH data GENERATE FLATTEN(STRSPLIT(name,'/',2));
DUMP A;
However the result i'm getting in the terminal is:
(David Jones, John Smith)
STRSPLITcreates a tuple in the same row. Flattening it will collapse it back together.I suggest trying without the flatten