Je reçois une exception lors de l'extraction en essayant d'utiliser le JsonExtractor
personnalisé de la bibliothèque Microsoft.Analytics.Samples.Formats
avec un fichier gzippé.Échec de l'extraction U-SQL pour gz avec JsonExtractor personnalisé
Microsoft.Cosmos.ScopeStudio.BusinessObjects.Debugger.ScopeDebugExceptionwasunhandledMessage: Anunhandledexceptionoftype'Microsoft.Cosmos.ScopeStudio.BusinessObjects.Debugger.ScopeDebugException'occurredinMicrosoft.Cosmos.ScopeStudio.BusinessObjects.Debugger.dllAdditionalinformation: {
"diagnosticCode": 195887142,
"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: \"Unexpected character encountered while parsing number: j. Path '', line 1, position 33.\"\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
at Newtonsoft.Json.JsonTextReader.ReadNumberIntoBuffer()
at Newtonsoft.Json.JsonTextReader.ParseNumber(ReadType readType)
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Microsoft.Analytics.Samples.Formats.Json.JsonExtractor.<Extract>d__2.MoveNext()
at ScopeEngine.SqlIpExtractor<ScopeEngine::GZipInput,Extract_0_Data0>.GetNextRow(SqlIpExtractor<ScopeEngine::GZipInput23644,Extract_0_Data0>* , Extract_0_Data0* output) in c:23644projects23644data-insights23644data_insights_ingestion_service23644datainsights.internalbi.scripts23644bin23644debug23644746497ac301de51323644n-populateaccountcurrencycodes.usql.debug_6b364b066929ac9723644sqlmanaged.h:line 1873",
"internalDiagnostics": ""
}
L'extraction est réussie si les fichiers JSON sont transmis sans les compresser.
J'ai également testé des fichiers CSV gzippés, ils semblent fonctionner très bien. Ceci est rencontré lors d'un LocalRun. Je n'ai pas encore soumis ce script au cloud.
Pouvez-vous s'il vous plaît partager votre script USQL ainsi? J'utilise actuellement le même assemblage sans aucun problème. –
@PaulAndrew utilisez-vous une archive zippée compressée (gzip) (* .tar.gz) avec le 'JsonExtractor'? Un exemple de ce que je suis en train de faire est: 'EXTRACT chaîne prop_1, chaîne prop_2 de @ "/ JSON/sampleJsonFiles.tar.gz" UTILISATION nouvelle Microsoft.Analytics.Samples.Formats.Json.JsonExtractor()) AS a'' – sponturious