Reputation: 63
I'm trying to get result from BigQuery view in a google sheets. To do that I'm using a script from Ido Green that he posted on your blog. https://greenido.wordpress.com/2013/12/16/big-query-and-google-spreadsheet-intergration/ It works well for Tables, but I need to extend to query Views. When I'm using SQL with View I get this error:
GoogleJsonResponseException: Invalid table name: `my_project:Data_Set.1_0_View_all_users_with_domain_names` [Try using standard SQL (https://cloud.google.com/bigquery/docs/reference/standard-sql/enabling-standard-sql)].
Upvotes: 0
Views: 282
Reputation: 7058
If you don't specify otherwise the BigQuery API will default to LegacySQL and you're using StandardSQL notation. You can try setting useLegacySql
to false by replacing line 31 to something like:
queryRequest.setQuery(sql).setTimeoutMs(100000).setUseLegacySql(false);
Upvotes: 1