0
votes

I am getting this error, while trying to use a BigQuery view data source in Google Data Studio:

Error Details: There's a query error. Cannot reference a SQL view in a Legacy SQL query.

enter image description here

So, I checked the view's info and the "Use Legacy SQL" is false:

enter image description here

The view is working fine in BigQuery, but it seems that Google Data Studio is running the query in "Legacy mode" instead of "SQL Standard Dialect mode". If this is the problem, how can I change this setting in the Data Studio?

Thanks for your help.

1
check stackoverflow.com/q/42064616/5221944 - look at comments and answer - Mikhail Berlyant
You need to use the custom query option (e.g. with SELECT * FROM YourViewName) for the time being, which lets you specify to use standard SQL. - Elliott Brossard
@ElliottBrossard it is working now, by using Google Datastudio "Custom Query" option and not the view. Thank you very much!! - Milton
@ElliottBrossard - any chance you could promote your comment to an answer? - Graham Polley
I added a proper answer now. When the Data Studio team announces support for standard SQL views as data sources, I'll update the answer. - Elliott Brossard

1 Answers

1
votes

You need to use the custom query option for the time being, which lets you specify to use standard SQL. Your query can simply be:

SELECT * FROM YourViewName;

My understanding at the time of this writing is that the Data Studio team is still working on support for data sources created from standard SQL views.