How to use the datatype 'TIMESTAMP WITH TIME ZONE' in the creation of flink table

104 views Asked by At

As mentioned in the Flink documentation there is a datatype 'TIMESTAMP WITH TIME ZONE' in Flink. Link to documention : https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/types/#timestamp-with-time-zone. But when I try to create table with a column with this datatype I get an error from the Flink sql parser, ParserException. Encountered 'TIME' was expecting "LOCAL". Has anyone faced this problem ?. When I look online I am unable to find any examples using this datatype in the table creation.

I am trying to create table with a column that supports time stamp along with the offset data stored with it. This avoid forcing me to make a UDF to handle the same problem.

1

There are 1 answers

0
Martijn Visser On

Currently TIMESTAMP WITH TIME ZONE type only exists as a logical type and is not supported by Flink SQL. It's work is tracked under https://issues.apache.org/jira/browse/FLINK-20869 and there's an open Jira ticket to fix the documentation https://issues.apache.org/jira/browse/FLINK-23882