cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Autoloader is not able to infer schema from json

p_romm
New Contributor III

Hi, 
I have json files and it contains json array and only one object (payload below), I have set in autoloader inferSchema to true, however autoloader throws:
"Failed to infer schema for format json from existing files ..."
I have also check option to set multiLine to true, this doesn't work as well. 
If there is more items in array then autoloader works as expected, is there any setting that allows to infer schema based only on one item in array?

Payload:
[
    {
          "Time": "2025-02-17T19:53:38",
          "Published": "2025-02-14T12:00:33",
           "Id": "411042",
           "Name ": "Test",
           "Code": "24411"
    }
]

1 REPLY 1

p_romm
New Contributor III

Yep, my mistake, json file was corrupted. 

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now