cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to save the mv for creating a table from using a json keys

LB123
Rocketeer

I am trying to create a table reading the json object and dynamically getting the table columns from the json objects. I am able to display the data in notebook and getting the expected result but unable to save the schema when I am dynamically getting the table columns. If I hard code the values I am able to save it. Even added a property  spark.dataframe.sampling.enabled to false.

 Failed to generate schema
ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1

 

1 REPLY 1

dylanwan
Employee
Employee

Can. you share some sample json data?  I suspect that this is a data issue.  The data used in generating the schema definition may not match the dynamic data fetched.

The schema is generated during the design time and we don't really support dynamically generated schema from JSON.