KNOWLEDGE BASE

Error "Google BigQuery service was unable to compile the query" When Connecting with Custom SQL


Published: 27 Feb 2015
Last Modified Date: 13 Nov 2017

Issue

When previewing results or dragging a field into the view, one of the following error messages might occur:

An error occurred while loading the data. The Google BigQuery service was unable to compile the query. Field "[Field Name]" not found. 

An error occurred while communicating with the Google Big Query data source [CustomSQLQuery]. The Google BigQuery service was unable to compile the query. Field "[Field Name]" not found. 

Environment

  • Tableau Desktop
  • Google BigQuery
  • Custom SQL

Resolution

Ensure that the fields within the Custom SQL are aliased. For example, the below query would fail because the [payload.desc] field is not aliased.
SELECT [created_at] AS [created_at],
  [public] AS [public],
  [actor] AS [actor],
  [payload.desc]
FROM [publicdata:samples.github_nested] [github_nested]

Cause

Tableau Desktop does not alter custom SQL when sent to Google Big Query, so the syntax must include aliases. 
Did this article resolve the issue?