[
https://issues.apache.org/jira/browse/FLINK-18613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17158988#comment-17158988
]
Jark Wu commented on FLINK-18613:
---------------------------------
This is resolved in 1.11.
In Flink 1.11, we introduced a new interface for table sink (FLIP-95). Flink
will not validate the primary key and sink can derive the primary key from DDL
({{DynamicTableFactory.Context#getCatalogTable#getSchema()#getPrimaryKey()}}).
All the built-in sinks (JDBC,HBase, ES) supports the new sink interface, so I
think you can try 1.11. You can learn more about the new inferface in the docs:
https://ci.apache.org/projects/flink/flink-docs-master/dev/table/sourceSinks.html
Btw, I would suggest to use mailing list to ask question, there will be more
people can help you there. JIRA is used for reporting bugs and development.
> How to support retract & upsert sink for a TableSink ?
> ------------------------------------------------------
>
> Key: FLINK-18613
> URL: https://issues.apache.org/jira/browse/FLINK-18613
> Project: Flink
> Issue Type: Wish
> Components: Table SQL / Planner
> Reporter: hehuiyuan
> Priority: Minor
>
> Environment : FLink 1.9 / Blink planner
> Hi , i want to ask a question :
> I have a job that executes multiple sql and a TableSink class:
> (1) insert into table_0 select count(*) from table1;
> (2)insert into table_2 select name, sum(score) form table1 group by name;
>
> The TableSink implements UpsertStreamTablesink interface.
> That is ok for SQL (2), but is not suppported for SQL (1) which there are not
> keys.
>
> But i want to use a TableSink which can support the upsert and retract , can
> you give me some advices? ~ Thanks.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)