So I am trying to pull data from an external database using JDBC Map<String, String> options = new HashMap<>(); options.put("driver", driver); options.put("url", dburl); options.put("dbtable", "tmpTrunk");
DataFrame tbTrunkInfo = sqlContext.load("jdbc", options); And the following exception gets thrown: java.sql.SQLException: Unsupported type -9 at org.apache.spark.sql.jdbc.JDBCRDD$.getCatalystType(JDBCRDD.scala:76) at org.apache.spark.sql.jdbc.JDBCRDD$.resolveTable(JDBCRDD.scala:110) at org.apache.spark.sql.jdbc.JDBCRelation.<init>(JDBCRelation.scala:125) at org.apache.spark.sql.jdbc.DefaultSource.createRelation(JDBCRelation.scala:114) at org.apache.spark.sql.sources.ResolvedDataSource$.apply(ddl.scala:290) at org.apache.spark.sql.SQLContext.load(SQLContext.scala:679) at org.apache.spark.sql.SQLContext.load(SQLContext.scala:667) I looked the schema for the table "tmpTrunk" and the function org.apache.spark.sql.jdbc.JDBCRDD$.getCatalystType(JDBCRDD.scala:76) And it appears that the datatype nvarchar is not supported, among several other commonly used datatypes. Is it possible to request an expansion of this method to include more java.sql.Types? -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/Unsupported-types-in-org-apache-spark-sql-jdbc-JDBCRDD-getCatalystType-tp22573.html Sent from the Apache Spark User List mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org