Big Query - error with SQL dialects
Getting the following error when running a Big Query query
error: "Cannot reference a standard SQL view in a legacy SQL query. [Try using standard SQL (https://cloud.google.com/bigquery/docs/reference/standard-sql/enabling-standard-sql)]"
-
Official comment
Turns out Google Big Query changed their SQL dialects (https://cloud.google.com/bigquery/docs/reference/standard-sql/enabling-standard-sql). To get this working in Knowi, you have to specify the dialect at the first line of your Big Query query using a shebang.
For example, if using a standard SQL, the first line of the query should be #standardSQL
#standardSQL
SELECT * FROM (SELECT "apple" AS fruit, "carrot" AS vegetable);
To see it in action: https://recordit.co/5O5vpP1v3iComment actions
Please sign in to leave a comment.
1 comment