You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by KhajaAsmath Mohammed <md...@gmail.com> on 2020/09/30 17:54:36 UTC

Spark JDBC- OAUTH example

Hi,

I am looking for some information on how to read database which has oauth
authentication with spark -jdbc. any links that point to this approach
would be really helpful

Thanks,
Asmath

Re: Spark JDBC- OAUTH example

Posted by Gabor Somogyi <ga...@gmail.com>.
I know what you're writing, please check the code which will answer your
questions: https://github.com/apache/spark/pull/29024
The API provides quite a freedom when a custom provider is implemented.

G


On Wed, Sep 30, 2020 at 8:29 PM Artemis User <ar...@dtechspace.com> wrote:

> I'm just curious in regard to what this JDBC connection provider does.  If
> just read data from a database to Spark, wouldn't it be just using the
> existing JDBC data source?
> http://spark.apache.org/docs/latest/sql-data-sources-jdbc.html
>
> BTW, OAuth is a web authentication protocol, not part of the JDBC.  If I
> understand this correctly, you use OAuth to gain user access at the web
> portal level, but use DBMS authentication at the JDBC level.
>
> -- ND
> On 9/30/20 2:11 PM, Gabor Somogyi wrote:
>
> Not sure there is already a way. I'm just implementing JDBC connection
> provider which will make it available in 3.1. Just to be clear when the API
> is available custom connection provider must be implemented.
>
> With actual Spark one can try to write a driver wrapper which does the
> authentication.
>
> G
>
>
>
> On Wed, 30 Sep 2020, 19:55 KhajaAsmath Mohammed, <md...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I am looking for some information on how to read database which has oauth
>> authentication with spark -jdbc. any links that point to this approach
>> would be really helpful
>>
>> Thanks,
>> Asmath
>>
>

Re: Spark JDBC- OAUTH example

Posted by Artemis User <ar...@dtechspace.com>.
I'm just curious in regard to what this JDBC connection provider does.  
If just read data from a database to Spark, wouldn't it be just using 
the existing JDBC data source? 
http://spark.apache.org/docs/latest/sql-data-sources-jdbc.html

BTW, OAuth is a web authentication protocol, not part of the JDBC.  If I 
understand this correctly, you use OAuth to gain user access at the web 
portal level, but use DBMS authentication at the JDBC level.

-- ND

On 9/30/20 2:11 PM, Gabor Somogyi wrote:
> Not sure there is already a way. I'm just implementing JDBC connection 
> provider which will make it available in 3.1. Just to be clear when 
> the API is available custom connection provider must be implemented.
>
> With actual Spark one can try to write a driver wrapper which does the 
> authentication.
>
> G
>
>
>
> On Wed, 30 Sep 2020, 19:55 KhajaAsmath Mohammed, 
> <mdkhajaasmath@gmail.com <ma...@gmail.com>> wrote:
>
>     Hi,
>
>     I am looking for some information on how to read database which
>     has oauth authentication with spark -jdbc. any links that point to
>     this approach would be really helpful
>
>     Thanks,
>     Asmath
>

Re: Spark JDBC- OAUTH example

Posted by Gabor Somogyi <ga...@gmail.com>.
Not sure there is already a way. I'm just implementing JDBC connection
provider which will make it available in 3.1. Just to be clear when the API
is available custom connection provider must be implemented.

With actual Spark one can try to write a driver wrapper which does the
authentication.

G



On Wed, 30 Sep 2020, 19:55 KhajaAsmath Mohammed, <md...@gmail.com>
wrote:

> Hi,
>
> I am looking for some information on how to read database which has oauth
> authentication with spark -jdbc. any links that point to this approach
> would be really helpful
>
> Thanks,
> Asmath
>