KNOWLEDGE BASE

Error "Google BigQuery service was unable to compile the query" when union two Tables


Published: 09 Jul 2021
Last Modified Date: 12 Jul 2021

Issue

When unioning two Tables from BigQuery and applying the date dimension into the filter, the following error messages might occur

 The Google BigQuery service was unable to compile the query

 Column 2 in UNION ALL has incompatible types: DATETIME, DATETIME, TIMESTAMP, TIMESTAMP, DATETIME at [24:7]

Environment

  • Tableau Desktop 2021.1.0
  • macOS 10.15
  • Google BigQuery

Resolution

Ensure all the tables in the union has the same structure. That is, each table must have the same number of fields, and related fields must have matching field names and data types.

Cause

Due to the different structures between tables, the field with Datetime type in BigQuery is not properly converted to TIMESTAMP in Tableau Desktop which is leading to the incompatible types error.
Did this article resolve the issue?