加载时间戳时出现Bigquery错误 [英] Bigquery Error When Loading Timestamp

查看:209
本文介绍了加载时间戳时出现Bigquery错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图加载一个CVS,该CVS有一个数据类型为'timestamp'的字段。当我尝试将该数据加载到表中时,出现错误:


google.api.core.exceptions.BadRequest:400 CSV表遇到太多
很多错误,放弃。行数:1;错误:1.

我知道这个特定的列是问题所在,因为当我删除该列时,数据将无误地上传。我应该怎么做才能上传时间戳。



我使用bigquery API,python-client-library。

我的数据如下所示:



< img src =https://i.stack.imgur.com/5EJEh.pngalt =在这里输入图片描述>

解决方案

有效的TIMESTAMP表示法在此处详述: https://云端您可以使用UNIX Timestamp(例如1408452095.220)或日期/时间字符串(即.sql文件)。 。2014-08-19 07:41:35.220 -05:00)。

I am trying to load a CVS that has a field whose data is of type 'timestamp.' When I try to load that data into the table, I get the error:

google.api.core.exceptions.BadRequest: 400 CSV table encountered too many errors, giving up. Rows: 1; errors: 1.

I know that this particular column is the problem because when I eliminate that column, the data gets uploaded without errors. What should I do to upload timestamps.

I am using bigquery API, python-client-library.

My data looks like this:

解决方案

Valid TIMESTAMP representations are detailed here: https://cloud.google.com/bigquery/data-types#legacy_sql_data_types

You can either use UNIX Timestamp (ie. 1408452095.220) or a Date/Time string (ie. "2014-08-19 07:41:35.220 -05:00").

这篇关于加载时间戳时出现Bigquery错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆