1
votes

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:

enter image description here

1
It would be helpful for debugging if you could provide the format your CSV data is in for the timestamp fields.Victor Mota

1 Answers

1
votes

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").