我想在BigQuery中的AppEngine RequestLog表之一中使用表裝飾器範圍。根據文檔日誌條目是LogEntry https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry類型的對象。BigQuery表裝飾對比AppEngine RequestLog時間戳
有兩列timestamp和receiveTimestamp。第一列描述爲「發生日誌條目描述的事件發生的時間」,第二列描述爲「Stackdriver日誌記錄收到日誌條目的時間」。
我試圖比較表查詢表中使用時間戳列和表修飾器範圍的時間範圍和記錄數。
查詢我在哪裏使用時間戳列。
SELECT count(*), MIN(timestamp), max(timestamp)
FROM [project_id:dataset.appengine_googleapis_com_request_log_20170622]
WHERE timestamp between timestamp('2017-06-22 01:00:00') and
date_add(timestamp('2017-06-22 01:00:00'), 1, 'hour')
查詢結果。
1698320 | 2017-06-22 01:00:00 UTC | 2017-06-22 01:59:59 UTC
查詢我在哪裏使用table decorator範圍。
--select timestamp_to_msec(timestamp('2017-06-22 01:00:00')) as time1,
timestamp_to_msec(date_add(timestamp('2017-06-22 01:00:00'), 1, 'hour')) as time2
SELECT count(*), min(timestamp), max(timestamp)
FROM [project_id:[email protected]000-1498096800000]
查詢結果。
1534754 | 2017-06-22 00:40:45 UTC | 2017-06-22 01:35:59 UTC
我沒有得到相同的日期範圍和相同數量的記錄。這三個時間戳各是什麼意思?以及table decorators範圍如何在引擎蓋下工作? (BigQuery是否創建了表的快照)