BigQueryでPARTITIONTIMEを比較対象にする場合の記述

Posted on Jan 10, 2019

比較対象はtimestamp型に変更してから比較

SELECT
  *
FROM
  [zzzzzzzzzz.xxxxxxxxxxxxx]
WHERE
  _PARTITIONTIME between timestamp('2018-12-04') and timestamp('2018-12-11')
ORDER BY log_time DESC
LIMIT 100