You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Rafael Wicht (Jira)" <ji...@apache.org> on 2020/05/06 20:14:00 UTC
[jira] [Created] (FLINK-17548) Table API Schema from not working
Rafael Wicht created FLINK-17548:
------------------------------------
Summary: 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
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. Error:
Caused by: org.apache.flink.table.api.ValidationException: Could not map the schema field 'user_server' to a field from source. Please specify the source field from which it can be derived.
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)