In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains the "zeppelin mysql empty time field error can not be represented as java.sql.Timestamp how to solve", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's train of thought slowly in depth, together to study and learn "zeppelin mysql empty time field error can not be represented as java.sql.Timestamp how to solve" it!
When using zeppelin to connect to mysql through jdbc, I encountered an error in the empty time field
Can not be represented as java.sql.Timestamp
Solution:
Solution:
Add the zeroDateTimeBehavior parameter to jdbc url:
Datasource.url=jdbc:mysql://localhost:3306/dbName?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
ZeroDateTimeBehavior=round is used to specify how the default value of the DateTime field in MySql should be handled when querying; the default is to throw an exception
For records with a value of 0000-00-0000: 00:00 (the default), different results will be returned in the following two configurations:
ZeroDateTimeBehavior=round 0001-01-01 0014 00.0
ZeroDateTimeBehavior=convertToNull null
As shown below:
Thank you for your reading, the above is the "zeppelin mysql empty time field error can not be represented as java.sql.Timestamp how to solve" content, after the study of this article, I believe you on the zeppelin mysql empty time field error can not be represented as java.sql.Timestamp how to solve this problem has a more profound experience, the specific use also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.