spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Yue <>
Subject Re: Spark for Oracle sample code
Date Fri, 25 Sep 2015 23:30:13 GMT
In your dbtable you can insert "select ..." instead of table name. I never tried, but saw example
from the web. Best regards,  Jonathan 
      From: Cui Lin <>
 To: user <> 
 Sent: Friday, September 25, 2015 4:12 PM
 Subject: Spark for Oracle sample code

Hello, All,
I found the examples for JDBC connection are mostly read the whole table and then do operations
like joining.
val jdbcDF ="jdbc").options( 
  Map("url" -> "jdbc:postgresql:dbserver",
  "dbtable" -> "schema.tablename")).load()
Sometimes it is not practical since the whole table data is too big and not necessary.
What makes sense to me is to use sparksql to get subset data from oracle tables using sql-like
statement.I couldn't find such examples. Can someone show me?

Best regards!


View raw message