Unable to save the mv for creating a table from using a json keys
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2025 11:22 AM
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
- Labels:
-
Materialized Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2025 02:27 PM
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.
