我尝试从 pdf 复制此代码并将其粘贴到 VM Gedit 中:
为什么简单的 Control C 和 Control V 不起作用!?
谢谢您的帮助!
records = LOAD '2013_subset.csv' USING PigStorage(',') AS
(Year,Month,DayofMonth,DayOfWeek,DepTime,CRSDepTime,ArrTime,\
CRSArrTime,UniqueCarrier,FlightNum,TailNum,ActualElapsedTime,\
CRSElapsedTime,AirTime,ArrDelay,DepDelay,Origin,Dest,\
Distance:int,TaxiIn,TaxiOut,Cancelled,CancellationCode,\
Diverted,CarrierDelay,WeatherDelay,NASDelay,SecurityDelay,\
LateAircraftDelay);
milage_recs = GROUP records ALL;
tot_miles = FOREACH milage_recs GENERATE SUM(records.Distance);
STORE tot_miles INTO /user/root/totalmiles;