Google BigQuery: Import fails with Unknown Type INTERNAL

When you try to import data from Google BigQuery, you might see the below error and fail to import the data.

Unknown Type INTERNAL

This happens when your query result contains columns with Interval data type (ref: Interval Data Type)

To work around this, you might want to CAST these Interval columns as strings as follows:

SELECT  CAST(COL_A as STRING) as String_Column ...

ref: Conversion functions  |  BigQuery  |  Google Cloud

1 Like