You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Dawid Wysakowicz (Jira)" <ji...@apache.org> on 2020/11/20 15:52:00 UTC

[jira] [Updated] (FLINK-20263) Improve exception when metadata name mismatch

     [ https://issues.apache.org/jira/browse/FLINK-20263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dawid Wysakowicz updated FLINK-20263:
-------------------------------------
    Summary: Improve exception when metadata name mismatch  (was: Improve exception when metada name mismatch)

> Improve exception when metadata name mismatch
> ---------------------------------------------
>
>                 Key: FLINK-20263
>                 URL: https://issues.apache.org/jira/browse/FLINK-20263
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / API
>    Affects Versions: 1.12.0
>            Reporter: Dawid Wysakowicz
>            Priority: Critical
>             Fix For: 1.12.0
>
>
> I'd suggest to slightly improve the exception message when there is a mismatch in the field name. It would be nice to provide with an example of a valid syntax.
> I used:
> {code}
>    tstmp TIMESTAMP(3) METADATA,
> {code}
> Right now we get:
> {code}
> org.apache.flink.table.api.ValidationException: Invalid metadata key 'tstmp' in column 'tstmp' of table 'default_catalog.default_database.pageviews_per_region'. The DynamicTableSink class 'org.apache.flink.streaming.connectors.kafka.table.KafkaDynamicSink' supports the following metadata keys for writing:
> headers
> timestamp
> {code}
> would be nice to have something like:
> {code}
> org.apache.flink.table.api.ValidationException: Invalid metadata key 'tstmp' in column 'tstmp' of table 'default_catalog.default_database.pageviews_per_region'. The DynamicTableSink class 'org.apache.flink.streaming.connectors.kafka.table.KafkaDynamicSink' supports the following metadata keys for writing:
> headers
> timestamp
> Example:
> tstmp TIMESTAMP(3) METADATA FROM 'timestamp'
> {code}
> This would let users easier figure out the error in the syntax. I might've copied the example from somewhere, because of being lazy and I might not be aware of the other syntax. It would be hard for me to figure out what is the problem from the original exception.



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