Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

ToDate and GetMonth function help

$
0
0
Trying to read a table column defined as datetime in my pig script as follows

load ‘/tmp.psv’ using PIgStore() (open_dte : chararray);

Later I wanted to use GetMonth in pig script as followes.

Temp_dt = ToDate(open_dte, ‘yyyy-MM-DD’);
Month = GetMonth(temp_dt);

I am getting an error asking to use a explicit cast. Any insights in this issue?

Greatly appreciate your help!!

Thanks,
Murali

Viewing all articles
Browse latest Browse all 5648

Trending Articles