twalthr commented on a change in pull request #16290:
URL: https://github.com/apache/flink/pull/16290#discussion_r665209323



##########
File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/Table.java
##########
@@ -1355,6 +1355,33 @@ default Table limit(int offset, int fetch) {
      */
     TableResult executeInsert(String tablePath, boolean overwrite);
 
+    /**
+     * Declares that the pipeline defined by the given {@link Table} object 
should be written to a
+     * table defined by a {@link TableDescriptor}. It executes the insert 
operation.
+     *
+     * <p>The {@link TableDescriptor descriptor} is registered as an inline 
(i.e. anonymous)
+     * temporary table (see {@link 
TableEnvironment#createTemporaryTable(String, TableDescriptor)})
+     * using a unique identifier. Note that calling this method multiple 
times, even with the same
+     * descriptor, results in multiple sinks being registered.
+     *
+     * <p>Examples:
+     *
+     * <pre>{@code
+     * Schema schema = Schema.newBuilder()
+     *   .column("f0", DataTypes.STRING())
+     *   .build();
+     *
+     * Table table = tableEnv.from(TableDescriptor.forConnector("datagen")
+     *   .schema(schema)
+     *   .build());
+     *
+     * table.executeInsert(TableDescriptor.forConnector("blackhole")
+     *   .schema(schema)
+     *   .build());
+     * }</pre>
+     */
+    TableResult executeInsert(TableDescriptor descriptor);

Review comment:
       can you also add a `executeInsert(boolean overwrite)` descriptor method




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to