Azure-Samples / MyDriving

Building IoT or Mobile solutions are fun and exciting. This year for Build, we wanted to show the amazing scenarios that can come together when these two are combined. So, we went and developed a sample application. MyDriving uses a wide range of Azure services to process and analyze car telemetry data for both real-time insights and long-term patterns and trends. The following features are supported in the current version of the mobile app.
http://azure.com/mydriving
MIT License
388 stars 279 forks source link

Data Factory problem #518

Open PiDiBi opened 8 years ago

PiDiBi commented 8 years ago

CopyPipeline-FactTripDataBlobToSQL failed with

Database operation failed. Error message from database execution : The given value of type String from the data source cannot be converted to type nvarchar of the specified target column..

input: FactTripData-Blob - /tripdata/tables/factTripDataoutput/000000_0 sample

19334855-337d-4695-a8ca-ac614133c51d|Twitter:2793763672|Input string was not in a correct format.|2016-04-22 14:39:17|-125.61639962299718|470|463|false|21|49.243319886275735|16.5530183922208

second position! (should be date time) output table columnt is nvarchar(20)

output: FactTripDataTemp-SQL

factTripDataoutput: factTripData.hql tripDataWIP: FROM_UNIXTIME(minUnixTimestamp) as tripStartTime FROM tripDataWIPView tripDataWIPView: MIN(unixtimestamp) as minUnixTimestamp FROM tripDataInt

tripDataInt: tripDataInt.hql UNIX_TIMESTAMP(CONCAT(SPLIT(RecordedTimeStamp,'T')[0],' ',SUBSTR(SPLIT(RecordedTimeStamp,'T')[1],0,8)),'yyyy-MM-dd hh:mm:ss') as unixtimestamp FROM tripdata

tripdata is external table mapped to storage/rawdata/tripdata sample of recorededtimestamp: 2016-04-22T13:31:37.1735276Z

And it probably fails is it some way how to test this part of script?

PiDiBi commented 8 years ago

I probably found the problem testing on HDInsight cluster with access to my storage second position is not time but VIN and as input is "Input string was not in a correct format." = 41chars vin in factTripDataTemp is nvarchar(20) i will update find where to fix it

PiDiBi commented 8 years ago

PR created with fixes