-
Notifications
You must be signed in to change notification settings - Fork 0
/
JoinWeatherData.pig
5 lines (5 loc) · 1.32 KB
/
JoinWeatherData.pig
1
2
3
4
5
priemer_league_data = Load 'input/EnglandPriemerLeague.csv' using PigStorage(',') As (Div:chararray, Date:chararray,HomeTeam:chararray,AwayTeam:chararray, FTHG:float, FTAG:float, FTR:chararray, HTHG:float, HTAG:float, HTR:chararray, Attendance:float, Referee:chararray, HS:float, AS:float, HST:float, AST:float, HHW:float, AHW:float, HC:float, AC:float, HF:float, AF:float, HO:float, AO:float, HY:float, AY:float, HR:float, AR:float, HBP:float, ABP:float, GBH:float, GBD:float, GBA:float, IWH:float, IWD:float, IWA:float, LBH:float, LBD:float ,LBA:float ,SBH:float, SBD:float, SBA:float, WHH:float, WHD:float, WHA:float);
weatherdata_england = Load 'input/WeatherPriemer16England.csv' using PigStorage(',') As (GMT:chararray, MaxTemperatureF:int, MeanTemperatureF:int, MinTemperatureF:int, MaxDewPointF:int, MeanDewPointF:int, MinDewpointF:int, MaxHumidity:int, MeanHumidity:int, MinHumidity:int, MaxSeaLevelPressureIn:float, MeanSeaLevelPressureIn:float, MinSeaLevelPressureIn:float, MaxVisibilityMiles:int, MeanVisibilityMiles:int, MinVisibilityMiles:int, MaxWindSpeedMPH:int, MeanWindSpeedMPH:int, MaxGustSpeedMPH:int, PrecipitationIn:int, CloudCover:int, Events:chararray, WindDirDegrees:int);
unified_data = JOIN priemer_league_data BY Date, weatherdata_england BY GMT;
rmf output
STORE unified_data INTO 'output' using PigStorage(',');