Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.

fix-518 store to VIN shorter message if parsing failed #522

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/HDInsight/hivescripts/TripDataInt.hql
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/HDInsight/hivescripts/dimUserUpdate.hql
Original file line number Diff line number Diff line change
Expand Up @@ -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 != '';
2 changes: 1 addition & 1 deletion src/OBDLibrary/ObdShare/ObdUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static string ParseVINMsg(string result) //VIN
}
catch (Exception exp)
{
return exp.Message;
return "PARSING FAILED";
}
}

Expand Down