Superset picking Timestamp type of Trino tables as UNKNOWN

778 views Asked by At

Trino (formerly known as Presto SQL) Version - 341 SuperSet Version - 0.37.2

I have a table in Trino that has 1250 columns. 118 of these columns are timestamp type. When I add this table under Sources -> Tables -> Add a new record, all these timestamps are being identified as UNKNOWN. However, when I manually edit each timestamp column and change UNKNOWN -> TIMESTAMP, it all works fine as expected. Can someone help mitigate this problem? Is this a bug?

Adding the DB table in the below screen enter image description here

2

There are 2 answers

0
Maria Clara Bezerra On

Instead of using datetime type, use timestamp.

0
Cheater On

Trino (formerly known as Presto) supports parametric timestamp types which the legacy clients couldn't understand. There was a flag added in Trino - 338 to support this. After I added the property as a session property value in Superset Trino connection, this got resolved.

More details:

https://github.com/trinodb/trino/pull/4349
https://github.com/trinodb/trino/pull/4377
https://trino.io/docs/current/release/release-338.html

user can either set below property in Presto config:

deprecated.omit-datetime-type-precision: true

or using session property:

omit_datetime_type_precision