Can someone explain to me how to get this result below in Pigscript
my input file is below
a.txt
aaa.kyl,data,data
bbb.kkk,data,data
cccccc.hj,data,data
qa.dff,data,data
I am writing a pig script as follows
A = LOAD 'a.txt' USING PigStorage(',') AS(a1:chararray,a2:chararray,a3:chararray);
B = FOREACH A GENERATE FLATTEN(STRSPLIT(a1)),a2,a3;
I do not know how to do that. I need to do as shown below. Basically I need all the characters after the dot character in the first atom.
(kyl,data,data)
(kkk,data,data)
(hj,data,data)
(dff,data,data)
Can someone give me a code for this
source
share