diff --git a/src/HDInsight/hivescripts/TripDataInt.hql b/src/HDInsight/hivescripts/TripDataInt.hql index 2ca9ecbf..206f3d73 100644 --- a/src/HDInsight/hivescripts/TripDataInt.hql +++ b/src/HDInsight/hivescripts/TripDataInt.hql @@ -39,7 +39,7 @@ Runtime int INSERT INTO TABLE tripDataInt SELECT TripId, UserId, -vin, +SUBSTR(vin, 0, 20) as vin, UNIX_TIMESTAMP(CONCAT(SPLIT(RecordedTimeStamp,'T')[0],' ',SUBSTR(SPLIT(RecordedTimeStamp,'T')[1],0,8)),'yyyy-MM-dd hh:mm:ss') as unixtimestamp, AVG(Lat) as cLat, AVG(Lon) as cLon, diff --git a/src/HDInsight/hivescripts/dimUserUpdate.hql b/src/HDInsight/hivescripts/dimUserUpdate.hql index d263d481..1d96403e 100644 --- a/src/HDInsight/hivescripts/dimUserUpdate.hql +++ b/src/HDInsight/hivescripts/dimUserUpdate.hql @@ -10,6 +10,6 @@ LOCATION 'wasb://tripdata@${hiveconf:DataStorageAccount}.blob.core.windows.net/t INSERT INTO TABLE dimUser SELECT distinct UserId, -IF(vin is NULL,"Unknown",vin) as vin +IF(vin is NULL,"Unknown",SUBSTR(vin, 0, 20)) as vin FROM tripdata WHERE year=${hiveconf:Year} and month=${hiveconf:Month} and day=${hiveconf:Day} and TripId is not null and TripId!='' and UserId is not null and UserId != ''; \ No newline at end of file diff --git a/src/OBDLibrary/ObdShare/ObdUtil.cs b/src/OBDLibrary/ObdShare/ObdUtil.cs index 29ad20e3..a332576d 100644 --- a/src/OBDLibrary/ObdShare/ObdUtil.cs +++ b/src/OBDLibrary/ObdShare/ObdUtil.cs @@ -110,7 +110,7 @@ public static string ParseVINMsg(string result) //VIN } catch (Exception exp) { - return exp.Message; + return "PARSING FAILED"; } }