错误1003:无法找到别名truck_events_subset的运算符

时间:2016-12-01 09:37:01

标签: apache-pig hue

我写了一个猪脚本:

truck_events = LOAD '/user/data/truck_event_text_partition.csv' USING PigStorage(',')
AS (driverId:int, truckId:int, eventTime:chararray,                 
eventType:chararray, longitude:double, latitude:double,
eventKey:chararray, correlationId:long, driverName:chararray,
routeId:long,routeName:chararray,eventDate:chararray);
DESCRIBE truck_events;
truck_events_subset = LIMIT truck_events 100;
DESCRIBE truck_events_subset;
DUMP truck_events_subset;

但是我收到了一个错误:

  

错误org.apache.pig.tools.grunt.Grunt - ERROR 1003:无法找到   别名为truck_events_subset的运算符

1 个答案:

答案 0 :(得分:0)

CorrelationId字段中的数据是双精度浮点数。将数据类型更改为double。

truck_events = LOAD '/user/data/truck_event_text_partition.csv' USING PigStorage(',') AS (driverId:int, truckId:int, eventTime:chararray,eventType:chararray, longitude:double, latitude:double,eventKey:chararray, correlationId:double, driverName:chararray,routeId:long,routeName:chararray,eventDate:chararray);