雪花显示错误的日期
我正在尝试将日期列从 python 数据帧写入雪花。 但是,雪花在表中显示错误的值/年。
示例:
我尝试插入: 2010-10-15T00:00:00.000Z
雪花显示的内容: 40788570-09-06 17:00:00.000
当传递相同内容时在字符串数据类型中,它正确显示日期时间。 有人可以指导一下吗,谢谢。
I'm trying to write date column from my python dataframe to snowflake.
However, snowflake is displaying wrong values/year in the table.
Example:
I try to insert: 2010-10-15T00:00:00.000Z
What snowflake displays: 40788570-09-06 17:00:00.000
When the same is passed in String datatype, it displays the datetime correctly.
Can someone please guide, Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Snowflake 有多种方法来解析纪元时间戳,我不熟悉 panda/python 方面如何让它快乐,但可以向您展示正在发生的事情。
基本上你的Python日期是纪元微秒,默认转换将其视为纪元秒,因此当使用正确的级别解析它时,它或多或少是正确的(这里是错误的,因为将未来的日期隐藏为
s
然后读到这是我们
)。Snowflake has a number of ways to parse epoch timestamps, I am not familiar with the panda/python side how to make it happy, but can show you what is happening.
basically you python date is epoch_microsecond, and the default transform is treating it as epoch seconds, so when it's parsed with the correct level it's more or less correct (it's wrong here due to coverting the wildly future date to
s
and then read that isus
)..