2016-07-29 67 views
1

我想在BigQuery中運行WITH子句的查詢。甚至試圖運行一個非常簡單的像谷歌BigQuery的WITH不編譯

WITH randomquery AS (SELECT * FROM example_table) 
SELECT user FROM randomquery; 

導致編譯錯誤:

Error: Encountered " "WITH" "WITH "" at line 1, column 1. Was expecting: EOF

甚至複製並粘貼從documentation示例查詢會產生同樣的錯誤。可能是什麼問題?

回答

3

您是否取消選擇Use Legacy SQLShow Options下? CTE僅適用於BigQuery新的更標準的SQL方言(目前處於測試階段)。