KNOWLEDGE BASE

Error: "Incorrect data type" Accessing BigQuery Workbook on Tableau Online


Published: 16 Nov 2016
Last Modified Date: 06 Dec 2016

Issue

When accessing a live BigQuery workbook on Tableau Online which contains calculations with non aggregate date functions, the following error might occur: 
"Incorrect data type"

Environment

  • Tableau Online 10.1 
  • Google BigQuery 

Resolution

Option 1 

Open the affected workbook in Tableau Desktop 10.1. When prompted to upgrade the BigQuery connector, select Yes, and then republish the workbook. 

Option 2 

Rewrite any database views to use standard SQL. If unable to rewrite, see Switch from standard SQL back to legacy SQL for more information. 

Option 3 

Aggregate any Date functions in calculated fields using the ATTR function, and republish the workbook. For example: 

Without the ATTR function:

(DATEPART('day',TODAY())-1) 

 

With ATTR function:

ATTR((DATEPART('day',TODAY())-1))

Option 4 

Generate extracts for the live BigQuery connections and republish the workbook. 

Cause

Due to an unexpected change in 10.1 of Tableau Online, any date functions in calculated fields that are not aggregated, will not produce results. 
Did this article resolve the issue?