首页 > 解决方案 > 将数据从一个表附加到另一个表时出现 Bigquery 无效时间戳错误

问题描述

我正在尝试将数据从一个表复制到另一个具有不同分区和集群字段的表,但我不断收到无效的时间戳错误。我的源表中的数据始终是使用标准 SQL 写入的,并且我不会在从源表中查询数据的问题中运行。有没有其他人遇到过类似的问题?

这就是我的表格的样子:

Project: sample
Dataset: test
Table Name: table_a
event_id integer,
event_name string,
event_category string,
service_name string
service_timestamp timestamp
event_timestamp timestamp
Partitioned by event_timestamp, Clustered By: event_category

Project: sample
Dataset: test
Table Name: table_b
event_id integer,
event_name string,
event_category string,
service_name string
service_timestamp timestamp
event_timestamp timestamp
Partitioned by event_timestamp, Clustered By: service_name

我正在尝试使用以下命令将数据从 table_a 复制到 table_b:

bq query --allow_large_results --append_table --use_legacy_sql=false --destination_table 'sample.test.table_b'  "select * from \`sample.test.table_a\` where event_timestamp>='2018-01-01'";
Cannot return an invalid timestamp value of 632691030736614000 microseconds relative to the Unix epoch. The range of valid timestamp values is [0001-01-1 00:00:00, 9999-12-31 23:59:59.999999]; error in writing field service_timestamp```

标签: google-bigquery

解决方案


推荐阅读