Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sqlContext.read.format("jdbc").options(Map(
- "url" -> "jdbc:mysql://localhost/foo", "dbtable" -> "foo.bar")
- ).select("some_column", "another_column")
- .write.format("jdbc").options(Map(
- "url" -> "jdbc:mysql://localhost/foo", "dbtable" -> "foo.bar2")
- ).save("foo.bar2")
- java.lang.RuntimeException: org.apache.spark.sql.execution.datasources.jdbc.DefaultSource does not allow create table as select.
- at scala.sys.package$.error(package.scala:27)
- at org.apache.spark.sql.execution.datasources.ResolvedDataSource$.apply(ResolvedDataSource.scala:200)
- val prop: java.util.Properties = ???
- df.write.jdbc("jdbc:mysql://localhost/foo", "foo.bar2", prop)
Add Comment
Please, Sign In to add comment