Setting JDBC connector options using JdbcCatalog

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

Setting JDBC connector options using JdbcCatalog

Dylan Forciea

I was experimenting with the JdbcCatalog, and I see that the options match some of the SQL WITH options. I looked at the source code, and even see that it directly references those options from JdbcDynamicTableFactory. However, I didn’t see any obvious way to set scan.fetch-size or any way to generically set those properties that would go in the WITH clause of the SQL interface beyond the JdbcCatalog constructor arguments. Is there any way to set those after the catalog is created/registered?

 

Thanks,

Dylan Forciea

Reply | Threaded
Open this post in threaded view
|

Re: Setting JDBC connector options using JdbcCatalog

Leonard Xu
Hi, Dylan

The table in JdbcCatalog only contains basic options, it’s normal the table from JdbcCatalog does not bring some options.
Flink provides SQL Hints feature to specify or override table options[1], you can have a try.  

Best,
Leonard


在 2020年10月15日,10:20,Dylan Forciea <[hidden email]> 写道:

 scan.fetch-size 

Reply | Threaded
Open this post in threaded view
|

Re: Setting JDBC connector options using JdbcCatalog

Dylan Forciea

(Re-sending, so it also goes to the list serve)

 

Leonard,

 

That does seem to work for me, thank you! I was looking in the Table API, so that’s why I didn’t find that option.

 

Is there a way to specify the sql hints using the Table API? I had tried appending them onto a call to .from on the table environment, but it wasn’t happy with that.

 

Thanks,

Dylan Forciea

 

 

From: Leonard Xu <[hidden email]>
Date: Wednesday, October 14, 2020 at 10:20 PM
To: Dylan Forciea <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Subject: Re: Setting JDBC connector options using JdbcCatalog

 

Hi, Dylan

 

The table in JdbcCatalog only contains basic options, it’s normal the table from JdbcCatalog does not bring some options.

Flink provides SQL Hints feature to specify or override table options[1], you can have a try.  

 

Best,

Leonard

 



20201015日,10:20Dylan Forciea <[hidden email]> 写道:

 

 scan.fetch-size 

 

Reply | Threaded
Open this post in threaded view
|

Re: Setting JDBC connector options using JdbcCatalog

Leonard Xu
Hi, Dylan

Is there a way to specify the sql hints using the Table API?  

Unfortunately the sql hints only supported in SQL,  there’s no plan to support it in Table API AFAK, I’d suggest use SQL if possible,
currently SQL has better feature support than Table API.

Best,
Leonard