Loading

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

Udgivelsesdato: Apr 29, 2025
Beskrivelse

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]

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.
Løsning

Option 1

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.

Option 2

Use custom sql to manually cast Datetime to TIMESTAMP.

 

Vidensartikelnummer

001474365

 
Indlæser
Salesforce Help | Article