gpt4 book ai didi

mysql - "Value ' 0000-00-00 00 :00:00 ' can not be represented as java.sql.Timestamp" when connected to RDS mySQL DB on Google Data Studio Report.

转载 作者:行者123 更新时间:2023-11-29 18:27:04 27 4
gpt4 key购买 nike

我已成功将 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 时如何让它发挥作用吗?

最佳答案

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

SELECT * FROM table
WHERE date != 0;

关于mysql - "Value ' 0000-00-00 00 :00:00 ' can not be represented as java.sql.Timestamp" when connected to RDS mySQL DB on Google Data Studio Report.,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46091745/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com