当在Google Data Studio Report上连接到RDS mySQL DB时,“值'00:00:00'无法表示为java.sql.Timestamp”。

问题描述 投票:0回答:1

我已成功将RDS数据库连接为Google Data Studio上的数据源。表中的表和字段也显示正确的数据类型。

但是当尝试使用此数据源创建报表时,Time Dimension维度会出错:

Failed to execute connection with error: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp

我尝试在连接时将zeroDateTimeBehavior=convertToNull添加到数据库名称字段,但Google Data Studio不接受连接。

有什么想法,当一些时间戳是0000-00-00 00:00:00时如何使这个工作?

mysql datetime datasource rds google-data-studio
1个回答
0
投票

您可以尝试使用SQL解决它,但是您将丢失一些数据。例如:

SELECT * FROM table
WHERE date != 0;
© www.soinside.com 2019 - 2024. All rights reserved.