When I load data from MongoDB into a data frame using spark, there is one field with ObjecType
and ArrayType
whose value is null due to missing data, when I df.show()
I get an error:
Cannot cast ARRAY into a StructType at documents that are arrays.
Is there any way to solve this problem?
2
Answers
This is my db problem:
When I use pyspark and load db:
I have this fault:
This is my_db. These are two different types, and it has too much data. I do not have permission to pre-process this data.