Azure Data Factory: No data preview for JSON file

Wai-Wah Liu 0 Reputation points
2023-01-31T11:49:58.81+00:00

Dear reader,

In Azure Data Factory I can't seem to load a JSON file. In the Data Flow source I selected the JSON file and tried all possible options (Single document, Document per line and Array of documents). It tried other options as well, but I can't get a data preview on the final tab. The error message is always the same:

Malformed records are detected in schema inference. Parse Mode: FAILFAST. It could be because of a wrong selection in document form to parse json file(s). Please try a different 'Document form' (Single document/Document per line/Array of documents) on the json source.

The goal is to upload the variables ("ID", "Geslacht", "Leeftijd", "Onderwijssoort" ,"Migratieachtergrond", "RegioS", "Perioden","Gediplomeerden_1") with their data into a SQL database. Below shows how the JSON file is when extracted from the source.

Thank you for your help!

{"value":{"115141000":{"ID":115141000,"Geslacht":"3000","Leeftijd":"11800","Onderwijssoort":"A025284","Migratieachtergrond":"T001040","RegioS":"GM0034","Perioden":"2016SJ00","Gediplomeerden_1":"53"},
          "115141001":{"ID":115141001,"Geslacht":"3000","Leeftijd":"11800","Onderwijssoort":"A025284","Migratieachtergrond":"T001040","RegioS":"GM0034","Perioden":"2017SJ00","Gediplomeerden_1":"45"},
          "115141002":{"ID":115141002,"Geslacht":"3000","Leeftijd":"11800","Onderwijssoort":"A025284","Migratieachtergrond":"T001040","RegioS":"GM0034","Perioden":"2018SJ00","Gediplomeerden_1":"42"}}}
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
{count} votes

1 answer

Sort by: Most helpful
  1. Wai-Wah Liu 0 Reputation points
    2023-02-06T10:29:18.21+00:00

    Hello Martin,

    Thanks for answering. I have been able to display the preview. The original file was encoded UTF-8 with BOM, changing this to regular UTF-8 solved the problem.

    User's image


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.