我正在尝试将yyyy-mm-dd格式的时间转换为datetime,以便稍后对它们进行计算。
grunt> describe times_target;
times_target: {new_format: chararray,target: chararray}
grunt> dump times_target;
(2015-01-24,negative)
(2015-01-24,negative)
(2015-01-24,negative)
(2015-01-24,negative)
这就是我所尝试的,我得到的错误:
grunt> C = FOREACH times_target GENERATE ToDate(new_format, 'yyyy-MM-dd');
2015-01-28 13:28:00,074 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1070: Could not resolve ToDate using imports: [, org.apache.pig.builtin., org.apache.pig.impl.builtin.]
我注册了common.pig.jar,但没用。我做错什么了?我可以把它转换成iso,但是为什么一个简单的todate不能工作呢?
提前谢谢!!
1条答案
按热度按时间e5nszbig1#
直到0.11,todate才添加到pig中