You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Shyam Sarkar <ss...@gmail.com> on 2016/02/18 23:36:24 UTC

JDBC based access to RDD

Is there any good code example for JDBC based access to RDD ?
Thanks.

Re: JDBC based access to RDD

Posted by Shyam Sarkar <ss...@gmail.com>.
JdbcRDD.scala code is under the source code directory
 spark/core/src/main/scala/org/apache/spark/rdd

Thanks.

On Sat, Feb 20, 2016 at 11:51 AM, Shyam Sarkar <ssarkarayushnetdev@gmail.com
> wrote:

> I was going through the scala code implementing RDD in Spark 1.6 source
> code and I found JdbcRDD functions defined for JDBC
> based access to RDD data.  I want to see some example code how to use such
> functions.
>
> Thanks,
>
>
>
>
> On Thu, Feb 18, 2016 at 2:43 PM, Mich Talebzadeh <mi...@peridale.co.uk>
> wrote:
>
>> Can you please clarify your point
>>
>>
>>
>> Do you mean using JDBC to get data from other databases into Spark
>>
>>
>>
>>
>>
>> val s = HiveContext.load("jdbc",
>>
>> Map("url" -> _ORACLEserver,
>>
>> "dbtable" -> "table”,
>>
>> "user" -> _username,
>>
>> "password" -> _password))
>>
>>
>>
>> HTH
>>
>>
>>
>> Dr Mich Talebzadeh
>>
>>
>>
>> LinkedIn * https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
>> <https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*
>>
>>
>>
>> http://talebzadehmich.wordpress.com
>>
>>
>>
>> NOTE: The information in this email is proprietary and confidential. This
>> message is for the designated recipient only, if you are not the intended
>> recipient, you should destroy it immediately. Any information in this
>> message shall not be understood as given or endorsed by Peridale Technology
>> Ltd, its subsidiaries or their employees, unless expressly so stated. It is
>> the responsibility of the recipient to ensure that this email is virus
>> free, therefore neither Peridale Technology Ltd, its subsidiaries nor their
>> employees accept any responsibility.
>>
>>
>>
>>
>>
>> *From:* Shyam Sarkar [mailto:ssarkarayushnetdev@gmail.com]
>> *Sent:* 18 February 2016 22:36
>> *To:* user@spark.apache.org
>> *Subject:* JDBC based access to RDD
>>
>>
>>
>> Is there any good code example for JDBC based access to RDD ?
>>
>> Thanks.
>>
>
>

Re: JDBC based access to RDD

Posted by Shyam Sarkar <ss...@gmail.com>.
I was going through the scala code implementing RDD in Spark 1.6 source
code and I found JdbcRDD functions defined for JDBC
based access to RDD data.  I want to see some example code how to use such
functions.

Thanks,




On Thu, Feb 18, 2016 at 2:43 PM, Mich Talebzadeh <mi...@peridale.co.uk>
wrote:

> Can you please clarify your point
>
>
>
> Do you mean using JDBC to get data from other databases into Spark
>
>
>
>
>
> val s = HiveContext.load("jdbc",
>
> Map("url" -> _ORACLEserver,
>
> "dbtable" -> "table”,
>
> "user" -> _username,
>
> "password" -> _password))
>
>
>
> HTH
>
>
>
> Dr Mich Talebzadeh
>
>
>
> LinkedIn * https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
> <https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*
>
>
>
> http://talebzadehmich.wordpress.com
>
>
>
> NOTE: The information in this email is proprietary and confidential. This
> message is for the designated recipient only, if you are not the intended
> recipient, you should destroy it immediately. Any information in this
> message shall not be understood as given or endorsed by Peridale Technology
> Ltd, its subsidiaries or their employees, unless expressly so stated. It is
> the responsibility of the recipient to ensure that this email is virus
> free, therefore neither Peridale Technology Ltd, its subsidiaries nor their
> employees accept any responsibility.
>
>
>
>
>
> *From:* Shyam Sarkar [mailto:ssarkarayushnetdev@gmail.com]
> *Sent:* 18 February 2016 22:36
> *To:* user@spark.apache.org
> *Subject:* JDBC based access to RDD
>
>
>
> Is there any good code example for JDBC based access to RDD ?
>
> Thanks.
>

RE: JDBC based access to RDD

Posted by Mich Talebzadeh <mi...@peridale.co.uk>.
Can you please clarify your point

 

Do you mean using JDBC to get data from other databases into Spark

 

 

val s = HiveContext.load("jdbc",

Map("url" -> _ORACLEserver,

"dbtable" -> "table”,

"user" -> _username,

"password" -> _password))

 

HTH

 

Dr Mich Talebzadeh

 

LinkedIn   <https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw> https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw

 

 <http://talebzadehmich.wordpress.com/> http://talebzadehmich.wordpress.com

 

NOTE: The information in this email is proprietary and confidential. This message is for the designated recipient only, if you are not the intended recipient, you should destroy it immediately. Any information in this message shall not be understood as given or endorsed by Peridale Technology Ltd, its subsidiaries or their employees, unless expressly so stated. It is the responsibility of the recipient to ensure that this email is virus free, therefore neither Peridale Technology Ltd, its subsidiaries nor their employees accept any responsibility.

 

 

From: Shyam Sarkar [mailto:ssarkarayushnetdev@gmail.com] 
Sent: 18 February 2016 22:36
To: user@spark.apache.org
Subject: JDBC based access to RDD

 

Is there any good code example for JDBC based access to RDD ?

Thanks.