bigquery dataset name starting with a number and TABLE_DATE_RANGE

前端 未结 1 1466
遇见更好的自我
遇见更好的自我 2021-01-24 23:42

I\'m using bigquery with a dataset called \'87891428\' containing daily tables. I try to query a dates range thanks to the function TABLE_DATE_RANGE:

SELECT avg(         


        
1条回答
  •  北海茫月
    2021-01-25 00:47

    The fix for this is to use brackets around the dataset name and table prefix:

    SELECT avg(foo) 
    FROM (
          TABLE_DATE_RANGE([87891428.a_abc_], 
                           TIMESTAMP('2014-09-30'),
                           TIMESTAMP('2014-10-19'))
         )
    

    0 讨论(0)
提交回复
热议问题