diff --git a/src/HDInsight/hivescripts/TripDataInt.hql b/src/HDInsight/hivescripts/TripDataInt.hql index 2ca9ecbf..33e4841a 100644 --- a/src/HDInsight/hivescripts/TripDataInt.hql +++ b/src/HDInsight/hivescripts/TripDataInt.hql @@ -48,7 +48,7 @@ MAX(EngineLoad) as EngineLoad, MAX(EngineRPM) as EngineRPM, MAX(DistanceWithMIL) as DistanceWithMIL, MAX(Runtime) as Runtime -FROM tripdata +FROM tripDataWithoutNulls WHERE RecordedTimeStamp is not null GROUP BY TripId, UserId, vin, UNIX_TIMESTAMP(CONCAT(SPLIT(RecordedTimeStamp,'T')[0],' ',SUBSTR(SPLIT(RecordedTimeStamp,'T')[1],0,8)),'yyyy-MM-dd hh:mm:ss');