split命令在apache pig中不起作用

6xfqseft  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(308)
initialData = load 'Weather_Report.log' using PigStorage('|') as (cityid:int,cityname:chararray,currentWeather:chararray,weatherCode:int);
SPLIT initialData INTO noRainsCities IF weatherCode ==10;
STORE noRainCities INTO 'WEATHER_ANALYTICS/TEST_OUT/NoRainCititesData';

请帮帮我,伙计们,这是个错误

2016-09-28 11:03:14,597 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: <line 2, column 52>  Syntax error, unexpected symbol at or near '='
gzszwxb4

gzszwxb41#

iniData = LOAD 'empdetail.log' using PigStorage('|') as (id:int,x:chararray,city:chararray,tech:chararray);
split iniData into a if tech=='Java',b if city=='Pune';
dump a;
dump b;

伙计们:两个或两个以上的条件都满足了才开始工作;
问题解决了谢谢

相关问题