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

Eric Xiao commented on FLINK-25234:
-----------------------------------

We just hit similar errors when trying to consume JSON data with our timestamp 
format set to `json.timestamp-format.standard=ISO-8601` and the timestamp data 
to be of SQL format (and vice-versa). We have found this to happen on many 
occasions where their is a mismatch between `json.timestamp-format.standard` 
and the timestamp data in the JSON, which has led to some friction and 
confusion from our users with regards to what is wrong, since it's not too 
clear from the error message.

Is there a way we can automate the selection of timestamp formats? i.e. would 
it make sense/be a good feature to have a way to tell Flink to parse a 
timestamp with all supported formats? i.e. 
`json.timestamp-format.parse-style=\{strict, lenient}` where strict would be 
the default to ensure backwards compatibility?

Would love some feedback from the community / [~twalthr], I think we can 
definitely reduce some friction here for the users.

> Flink should parse ISO timestamp in UTC format
> ----------------------------------------------
>
>                 Key: FLINK-25234
>                 URL: https://issues.apache.org/jira/browse/FLINK-25234
>             Project: Flink
>          Issue Type: Improvement
>          Components: Formats (JSON, Avro, Parquet, ORC, SequenceFile), Table 
> SQL / API
>    Affects Versions: 1.14.0
>            Reporter: Egor Ryashin
>            Priority: Major
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Error parsing timestamp with ISO-8601 format:
> {code:java}
> [ERROR] Could not execute SQL statement. Reason:
> java.time.format.DateTimeParseException: Text '2021-12-08T12:59:57.028Z' 
> could not be parsed, unparsed text found at index 23 {code}



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

Reply via email to