【发布时间】:2019-06-07 10:05:38
【问题描述】:
Avro 架构:
{
"name": "Entity",
"type": "record",
"namespace": "com.foobar.entity",
"fields": [
{
"name": "attribute",
"type": "string"
},
{
"name": "value",
"type": "int"
},
{
"name": "timestamp",
"type": { "type": "long", "logicalType": "timestamp-micros" }
}
]
}
源时间戳为 Unix 格式,精度为毫秒。
当我将此类记录放入 BigQuery 时,我会在 BigQuery 数据预览中获得类似 1970-01-19 01:18:19.415 UTC 的值。但是我存储的值是1559899418,即Friday, 7. June 2019 09:23:38。任何想法为什么?
参考:https://cloud.google.com/bigquery/docs/loading-data-cloud-storage-avro#logical_types
【问题讨论】:
标签: google-bigquery avro