Fwd: JDBC connection in Flink using Scala ( Last mail attachment fail so i am resending the file)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: JDBC connection in Flink using Scala ( Last mail attachment fail so i am resending the file)

sunny patel
 ( Last email attachment fail so i am resending the file)

Hi Team,

I am wondering is that possible to add JDBC connection as a source or target in Flink using Scala.
Could you kindly some one help on this? DB write/sink code is not working.
if you have any sample code please share it here.

Thanks
Sunny


Inline image 1


Flink JDBC Sink Error.jpg (1009K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: JDBC connection in Flink using Scala ( Last mail attachment fail so i am resending the file)

Ufuk Celebi
Hey Sunny,

I think it's fine to first post to a single mailing list. I'm would stick to [hidden email] for this question.

You can have a look at the JDBCInputFormat and JDBCOutputFormat.

– Ufuk

On Tue, Sep 27, 2016 at 2:09 PM, sunny patel <[hidden email]> wrote:
 ( Last email attachment fail so i am resending the file)

Hi Team,

I am wondering is that possible to add JDBC connection as a source or target in Flink using Scala.
Could you kindly some one help on this? DB write/sink code is not working.
if you have any sample code please share it here.

Thanks
Sunny


Inline image 1


Reply | Threaded
Open this post in threaded view
|

Re: JDBC connection in Flink using Scala ( Last mail attachment fail so i am resending the file)

sunny patel
HI Guys,

I have JDBCOutput format based on the following method, it seem not working in flink scala version.

JDBCOutputFormat
.buildJDBCOutputFormat()
.setDrivername("")
.setDBUrl("")
.setQuery("insert into mtable (Id, name, sector) values (?,?,?)")
.finish() ;

Do you have any similar example to write files from CSV to database? 

Cheers
Sunny.

On Wed, Sep 28, 2016 at 8:55 AM, Ufuk Celebi <[hidden email]> wrote:
Hey Sunny,

I think it's fine to first post to a single mailing list. I'm would stick to [hidden email] for this question.

You can have a look at the JDBCInputFormat and JDBCOutputFormat.

– Ufuk

On Tue, Sep 27, 2016 at 2:09 PM, sunny patel <[hidden email]> wrote:
 ( Last email attachment fail so i am resending the file)

Hi Team,

I am wondering is that possible to add JDBC connection as a source or target in Flink using Scala.
Could you kindly some one help on this? DB write/sink code is not working.
if you have any sample code please share it here.

Thanks
Sunny


Inline image 1



Reply | Threaded
Open this post in threaded view
|

Re: JDBC connection in Flink using Scala ( Last mail attachment fail so i am resending the file)

Stephan Ewen
This is a pretty basic IDE setup issue you have, does not seem Flink specific.

Make sure you set up your project properly. Following the quick starts is the simplest way.

On Wed, Sep 28, 2016 at 2:44 PM, sunny patel <[hidden email]> wrote:
HI Guys,

I have JDBCOutput format based on the following method, it seem not working in flink scala version.

JDBCOutputFormat
.buildJDBCOutputFormat()
.setDrivername("")
.setDBUrl("")
.setQuery("insert into mtable (Id, name, sector) values (?,?,?)")
.finish() ;

Do you have any similar example to write files from CSV to database? 

Cheers
Sunny.

On Wed, Sep 28, 2016 at 8:55 AM, Ufuk Celebi <[hidden email]> wrote:
Hey Sunny,

I think it's fine to first post to a single mailing list. I'm would stick to [hidden email] for this question.

You can have a look at the JDBCInputFormat and JDBCOutputFormat.

– Ufuk

On Tue, Sep 27, 2016 at 2:09 PM, sunny patel <[hidden email]> wrote:
 ( Last email attachment fail so i am resending the file)

Hi Team,

I am wondering is that possible to add JDBC connection as a source or target in Flink using Scala.
Could you kindly some one help on this? DB write/sink code is not working.
if you have any sample code please share it here.

Thanks
Sunny


Inline image 1