[ https://issues.apache.org/jira/browse/FLINK-9852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16546423#comment-16546423 ]
ASF GitHub Bot commented on FLINK-9852: --------------------------------------- Github user twalthr commented on a diff in the pull request: https://github.com/apache/flink/pull/6343#discussion_r202982499 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/descriptors/SchematicDescriptor.scala --- @@ -19,14 +19,17 @@ package org.apache.flink.table.descriptors /** - * Common class for all descriptors describing a table sink. + * A trait for descriptors that allow to define a format and schema. */ -abstract class TableSinkDescriptor extends TableDescriptor { +trait SchematicDescriptor extends Descriptor { --- End diff -- `SchematicDescriptor` is used for `ExternalCatalogTable`, `StreamTableDescriptor`, and `BatchTableDescriptor`. If we add a new level next to `connector`, `format` (which may happens in the future), we would immediately get a compile error there. > Expose descriptor-based sink creation in table environments > ----------------------------------------------------------- > > Key: FLINK-9852 > URL: https://issues.apache.org/jira/browse/FLINK-9852 > Project: Flink > Issue Type: New Feature > Components: Table API & SQL > Reporter: Timo Walther > Assignee: Timo Walther > Priority: Major > Labels: pull-request-available > > Currently, only a table source can be created using the unified table > descriptors with {{tableEnv.from(...)}}. A similar approach should be > supported for defining sinks or even both types at the same time. > I suggest the following syntax: > {code} > tableEnv.connect(Kafka(...)).registerSource("name") > tableEnv.connect(Kafka(...)).registerSink("name") > tableEnv.connect(Kafka(...)).registerSourceAndSink("name") > {code} > A table could then access the registered source/sink. -- This message was sent by Atlassian JIRA (v7.6.3#76005)