-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
org.apache.spark.sql.AnalysisException: [UNSUPPORTED_DESERIALIZER.DATA_TYPE_MISMATCH] The deserializer is not supported: need a(n) "ARRAY" field but got "MAP<STRING, STRING>". #1295
Comments
I have created a sample code to generate the given error. The same piece of code was working fine with old connector on dataproc image version 2.0 |
if we complie our code as it was earlier we see below issue. E```
ThisBuild / version := "0.1.0-SNAPSHOT" ThisBuild / scalaVersion := "2.12.16" val sparkVersion = "3.3.0" lazy val root = (project in file(".")) //libraryDependencies += "org.apache.spark" %% "spark-core" % "3.3.0" libraryDependencies += "org.apache.spark" %% "spark-core" % sparkVersion % Provided
|
please don't add the spark bigquery connector using --jars/--packages, it is already built into image 2.2. See here if you want to change the version or type |
we are not adding it as suggested in document but still we are getting this issue..
Also, we have created our cluster with below parameter |
I had to change the schema of the case class Functions to solve this.
|
Above solution is not working. Now code is giving null pointer exception with different set of data. below is the stacktrace.
|
Recently we have been migrated to dataproc image 2.2 version along with supporting scala 2.12.18 and spark 3.5 version.
Above is the snippet of the actual code which was working fine with dataproc image 2.0 and scala 2.12.16 and spark 3.3 version.
Here we are reading bigquery table and trying to load them in set of case classes as they are defined above. Now we are facing below issue
Exception in thread "main" org.apache.spark.sql.AnalysisException: [UNSUPPORTED_DESERIALIZER.DATA_TYPE_MISMATCH] The deserializer is not supported: need a(n) "ARRAY" field but got "MAP<STRING, STRING>".
adding schema of a given bigquery table
;
The text was updated successfully, but these errors were encountered: