[ 
https://issues.apache.org/jira/browse/FLINK-17361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17098917#comment-17098917
 ] 

Jark Wu commented on FLINK-17361:
---------------------------------

I think we can get the schema information from 
{{java.sql.PreparedStatement#getMetaData}}. 

Regarding to this issue, I like the idea of this issue (i.e. registering a JDBC 
view as a Flink table). However, we still need to figure out what happens when 
insert into this table. I don't have a clear idea right now. But I think 
registering a source-only table is an approach. However, we still need to 
introduce a mechanism to register a source-only or sink-only table in the 
framework. 

> Support creating of a JDBC table using a custom query
> -----------------------------------------------------
>
>                 Key: FLINK-17361
>                 URL: https://issues.apache.org/jira/browse/FLINK-17361
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / API
>            Reporter: Flavio Pompermaier
>            Priority: Major
>
> In a long discussion on the mailing list it has emerged how it is not 
> possible to create a JDBC table that extract data using a custom query.
> A temporary workaround could be to assign as 'connector.table' the target 
> query.
> However this is undesirable. 
> Moreover, in relation to https://issues.apache.org/jira/browse/FLINK-17360, a 
> query could be actually a statement that requires parameters to be filled by 
> the custom parameter values provider



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to