spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco Colombo <>
Subject jdbcRRD and dataframe
Date Mon, 25 Jul 2016 14:14:42 GMT
Hi all,

I was using JdbcRRD and signature for constructure was accepting a
function to get a DB connection. This is very useful to provide my own
connection handler.

I'm valuating to move to daraframe, but I cannot how to provide such
function and migrate my code. I want to use my own 'getConnection'
rather than provide connection details.

JdbcRDD(SparkContext sc,
       scala.Function0<java.sql.Connection> getConnection,
 val df: DataFrame ="jdbc").options(options).load();

How this can be achieved?


View raw message