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

Timo Walther commented on FLINK-17548:
--------------------------------------

[~Wichtlein], the `connect()` API might need some improvements in the near 
future because the community focused on the new SQL DDL feature with computed 
column. I would recommend to use SQL DDL as a workaround.

> Table API Schema "from" not working
> -----------------------------------
>
>                 Key: FLINK-17548
>                 URL: https://issues.apache.org/jira/browse/FLINK-17548
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / API
>    Affects Versions: 1.10.0
>            Reporter: Rafael Wicht
>            Priority: Major
>
> The method 'from' of org.apache.flink.table.descriptors.Schema do not work 
> for me.
> Maybe I miss something.
> h3. Code:
> {{.withFormat({color:#cc7832}new {color}Json()}}
>  {{     .failOnMissingField({color:#cc7832}false{color}))}}
>  {{.withSchema({color:#cc7832}new {color}Schema()}}
>  {{     .field({color:#6a8759}"user_server"{color}{color:#cc7832}, 
> {color}DataTypes.STRING()).from({color:#6a8759}"user"{color}))}}
> h3. Result
> The field 'user_server' has the value 'null'.
> h3. Error:
> No Error.
> h3. Workaround:
> This code works!
> {{.withFormat({color:#cc7832}new {color}Json()}}
>  {{     .failOnMissingField({color:#cc7832}false{color}))}}
>  {{.withSchema({color:#cc7832}new {color}Schema()}}
>  {{     .field({color:#6a8759}"user"{color}{color:#cc7832}, 
> {color}DataTypes.STRING())}}
> h3.  
> h3. From the



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

Reply via email to