You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Dylan Forciea <dy...@oseberg.io> on 2020/10/15 02:20:47 UTC

Setting JDBC connector options using JdbcCatalog

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

Re: Setting JDBC connector options using JdbcCatalog

Posted by Leonard Xu <xb...@gmail.com>.
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


Re: Setting JDBC connector options using JdbcCatalog

Posted by Dylan Forciea <dy...@oseberg.io>.
(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 <xb...@gmail.com>
Date: Wednesday, October 14, 2020 at 10:20 PM
To: Dylan Forciea <dy...@oseberg.io>
Cc: "user@flink.apache.org" <us...@flink.apache.org>
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
[1] https://ci.apache.org/projects/flink/flink-docs-master/dev/table/sql/hints.html#dynamic-table-options



在 2020年10月15日,10:20,Dylan Forciea <dy...@oseberg.io>> 写道:

 scan.fetch-size


Re: Setting JDBC connector options using JdbcCatalog

Posted by Leonard Xu <xb...@gmail.com>.
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
[1] https://ci.apache.org/projects/flink/flink-docs-master/dev/table/sql/hints.html#dynamic-table-options


> 在 2020年10月15日,10:20,Dylan Forciea <dy...@oseberg.io> 写道:
> 
>  scan.fetch-size