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

Xianxun Ye commented on FLINK-24567:
------------------------------------

_Why not create print_table as another view?_
Create table from a view could avoid defining table fields. So if there are a 
hundred fields in a view, this way will save a lot of developing time.
Besides, when create table from a view, we should validate this table's Options 
whether contain `connector` or `connector.type` option.
[~airblader] how do you think?

> Support create tables using CatalogView defination
> --------------------------------------------------
>
>                 Key: FLINK-24567
>                 URL: https://issues.apache.org/jira/browse/FLINK-24567
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / API
>            Reporter: Xianxun Ye
>            Priority: Major
>
> Now when we run this sql will throw a ValidationException
> {code:java}
> sql("create view vi as select * from slothTest.testdb.animal");
> sql("CREATE TABLE print_table WITH ('connector' = 'blackhole') LIKE vi 
> (EXCLUDING ALL)");
> {code}
> {code:java}
> org.apache.flink.table.api.ValidationException: Source table 
> '`default_catalog`.`default_database`.`vi`' of the LIKE clause can not be a 
> VIEW, at line 1, column 60
> {code}
> Create table from some views during running a perfermence test job could be 
> usefull. 
>  hello [~dwysakowicz] what do you think about this feature?



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

Reply via email to