Home > other >  Abnormal DataFrame exported as parquet
Abnormal DataFrame exported as parquet

Time:09-21

In carrying out Df. Write. The format (" parquet "). The save (" D: \ \ Work \ \ Spark \ \ Data \ \ Df parquet ") the following exception message when
Java. Lang. RuntimeException: Error while encoding: Java. Lang. RuntimeException: Java lang. The Integer is not a valid external type for schema of the string,
But the execution of Df. Show while normal execution (false), please the great god are diagnosed, thank you!!!!!!

CodePudding user response:

Java. Lang. The Integer is not a valid external type for schema of the string,
Estimation is your StructType StructField definition of a field of type String, but you RDD (Row) in the corresponding to the Integer type
Check
You can put the posted your source code

CodePudding user response:

See from the literal meaning of the error message that is runtime type conversion error,
Can you give examples to come out?
  • Related