我尝试使用具有此语法的查询前缀来指定标准SQL,但Bigquery似乎忽略了该指令:
"#standardSQL \r\n
select column1 from `mydataset.myview`"
但是我收到了这个错误:
Running Query : #standardSQL
select column1 from mydataset.myview
---> Reason: invalidQuery
Message: Cannot reference a SQL view in a Legacy SQL query.
答案 0 :(得分:2)
我通过删除“#standardSQL和\ r \ n。
之间的空格来实现这一点使用:
"#standardSQL\r\n
不起作用:
"#standardSQL \r\n
RTFM:
"Must be separated from the query by a newline character"
我对FM的更新:
"Must be separated from the query by ONLY a newline character"