Guest User

Untitled

a guest
Sep 11th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. ls -l /usr/share/aws/redshift/jdbc/
  2.  
  3. RedshiftJDBC41-1.2.7.1003.jar
  4. RedshiftJDBC42-1.2.7.1003.jar
  5.  
  6. import org.apache.spark.sql._
  7. val sqlContext = new SQLContext(sc)
  8.  
  9.  
  10. val df : DataFrame = sqlContext.read
  11. .option("url","jdbc:redshift://host:PORT/DB-name?user=user&password=password")
  12. .option("dbtable","tablename")
  13. .load()
  14.  
  15. org.apache.spark.sql.AnalysisException: Unable to infer schema for Parquet. It must be specified manually.;
Add Comment
Please, Sign In to add comment