Error "WHERE clause should return  type bool, but returns <...>" After Upgrading to Tableau 10.3 Queries and Attempting to Connect to Google BigQuery

Published: 09 Jul 2017
Last Modified Date: 20 Sep 2017


After upgrading to Tableau Desktop and/or Tableau Server 10.3, connecting your workbooks to Google BigQuery is the :
query: AND requires all arguments to be of type bool. The 1st operand was of type int32 (error code: invalidQuery) 
WHERE clause should return  type bool, but returns INT64 [1:139]

Additionally, the issue occurs if a calculated field returns boolean calculation type such as TRUE / FALSE. An example would be: 
[Param_State] = 'ALL' OR [Param_State]=[State]

Tableau Desktop 10.2 and earlier versions would create a SQL statement similar to:
SELECT ..... FROM <some table> WHERE 1(1<>0) Group By 2

Whereas Tableau Desktop 10.3, the below WHERE clause is incorrect and as a result, the execution of the SQL statement fails. An example of a wrong SQL statement would be:
SELECT ..... FROM <some table> WHERE 1 Group By 2


  • Tableau Desktop 10.3.0
  • Tableau Server 10.3.0
  • Google BigQuery


Option 1

Upgrade to Tableau Desktop 10.3.3. For more information, see Upgrading Tableau Desktop in Tableau Help.

Option 2

Update the calculated field so that the format becomes something similar to: IF ... THEN ... ELSE ... END.
For example: 
  • Current calculation: [Param_State] = 'ALL'  OR [Param_State] = [State]
  • Fixed calculation: IF [Param_State] = 'ALL'  OR [Param_State] = [State] THEN 1 ELSE 0 END 


A technical issue was found in the Google BigQuery connector in version 10.3.0. This behavior is related to a known issue (ID: 660780) that has been fixed in a recent release of Tableau Desktop. 
Did this article resolve the issue?