I am using CurrentTime (), which is a datetime data type. However, I need it as a chararray. I have the following:
A = LOAD ... B = FOREACH A GENERATE CurrentTime() AS todaysDate;
I tried various approaches, such as:
B = FOREACH A GENERATE (chararray)CurrentTime() AS todaysDate;
However, I always get ERROR 1052: cannot use datetime for chararray.
Does anyone know how I can do this? By the way, I am very new to pig. Thanks in advance!
source share