0
votes

Data Lake Analytics job failed with the following error with input as json file. Looks like a json formatting error. Any help is greatly appreciated. The json file was generated by stream analytics with data from IOT hub as input.

{ "jobId": "https://iotdla4c2c5a3b.azuredatalakeanalytics.net/jobLink/4eddd130-e0fc-45d4-8b3a-179b0e49f6c1", "errors": { "diagnosticCode": 195887158, "severity": "Error", "component": "RUNTIME", "source": "User", "errorId": "E_RUNTIME_USER_UNHANDLED_EXCEPTION_FROM_USER_CODE", "message": "An unhandled exception from user code has been reported when invoking the method 'Extract' on the user type 'Microsoft.Analytics.Samples.Formats.Json.JsonExtractor'", "description": "Unhandled exception from user code: \"Additional text encountered after finished reading JSON content: {. Path '', line 2, position 0.\"\nThe details includes more information including any inner exceptions and the stack trace where the exception was raised.", "resolution": "Make sure the bug in the user code is fixed.", "helpLink": "", "details": "==== Caught exception Newtonsoft.Json.JsonReaderException\n\n at Newtonsoft.Json.JsonTextReader.Read()\r\n at Microsoft.Analytics.Samples.Formats.Json.JsonExtractor.d__2.MoveNext()\r\n at ScopeEngine.RunUdoCodeExceptionhandled >(ScopeTypedManagedHandle* className, SByte* methodName, * code) in d:\data\yarnnm\local\usercache\9bb5486e-cb76-464b-a635-28243eb11fb0\appcache\application_1556746128054_0157\container_e391_1556746128054_0157_01_000001\wd\managed.h:line 2034", "userData": "" } }

1
Does Additional text encountered after finished reading JSON content: {. Path '', line 2, position 0.\"\n not give enough details? Seem like your input json is not correct. - Peter Bons

1 Answers

0
votes

DataLake stores json in two different formats. 1. line Feed. 2 Array. Changing the format to Array solved this problem