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

Yubin Li edited comment on FLINK-29252 at 9/10/22 1:00 AM:
-----------------------------------------------------------

According to flip 
[https://cwiki.apache.org/confluence/display/FLINK/FLIP-188%3A+Introduce+Built-in+Dynamic+Table+Storage]
 and the defintion of ManagedTableFactory interface, we shouldn't add CONNECTOR 
option to built-in table.
{code:java}
/**
 * Base interface for configuring a managed dynamic table connector. The 
managed table
 * factory is used when there is no FactoryUtil.CONNECTOR option.
**/
public interface ManagedTableFactory extends DynamicTableFactory {code}
 


was (Author: liyubin117):
According to flip 
[https://cwiki.apache.org/confluence/display/FLINK/FLIP-188%3A+Introduce+Built-in+Dynamic+Table+Storage]
 and the defintion of ManagedTableFactory interface, we shouldn't add CONNECTOR 
option to built-in table.

 

```

/**

 * Base interface for configuring a managed dynamic table connector. The 
managed table

 * factory is used when there is no FactoryUtil.CONNECTOR option.

public interface ManagedTableFactory extends DynamicTableFactory

```

> Support create table-store table with 'connector'='table-store'
> ---------------------------------------------------------------
>
>                 Key: FLINK-29252
>                 URL: https://issues.apache.org/jira/browse/FLINK-29252
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table Store
>    Affects Versions: table-store-0.3.0
>            Reporter: MOBIN
>            Priority: Minor
>              Labels: pull-request-available
>
> Support create table-store table with 'connector'='table-store': 
> sink to table-store:
> {code:java}
> SET 'execution.checkpointing.interval' = '10 s';
> CREATE TEMPORARY TABLE word_table (
>     word STRING
> ) WITH (
>     'connector' = 'datagen',
>     'fields.word.length' = '1'
> );
> CREATE TABLE word_count (
>     word STRING PRIMARY KEY NOT ENFORCED,
>     cnt BIGINT
> ) WITH(
>   'connector' = 'table-store',
>   'catalog-name' = 'test-catalog',
>   'default-database' = 'test-db',  //should rename 'catalog-database'?
>   'catalog-table' = 'test-tb',
>   'warehouse'='file:/tmp/table_store'
> );
> INSERT INTO word_count SELECT word, COUNT(*) FROM word_table GROUP BY word; 
> {code}
> source from table-store:
> {code:java}
> SET 'execution.checkpointing.interval' = '10 s';
> CREATE TABLE word_count (
>     word STRING PRIMARY KEY NOT ENFORCED,
>     cnt BIGINT
> ) WITH(
>   'connector' = 'table-store',
>   'catalog-name' = 'test-catalog',
>   'default-database' = 'test-db',
>   'catalog-table' = 'test-tb',
>   'warehouse'='file:/tmp/table_store'
> );
> CREATE TEMPORARY TABLE word_table (
>     word STRING
> ) WITH (
>     'connector' = 'print'
> );
> INSERT INTO word_table SELECT word FROM word_count;{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to