BigQuery datatype mapping
The data types from BigQuery are aligned with the corresponding Data Integration data types during the data extraction process. In cases where a specific data type is not compatible, it is converted and assigned as a String type.
The table illustrates the correlation between BigQuery data types and the equivalent types compatible with Data Integration:
| BigQuery Datatype | Data Integration Mapping Type | BigQuery's Casting in Multi-Tables River Mode | BigQuery's Casting in Custom Query River Mode |
|---|---|---|---|
| ARRAY | STRING | TO_JSON_STRING | TO_JSON_STRING |
| BIGNUMERIC | FLOAT | ||
| BOOL | INTEGER | INTEGER | INTEGER |
| BYTES | STRING | TO_JSON_STRING | |
| DATETIME | DATETIME | FORMAT_TIMESTAMP("%Y-%m-%d %H:%M:%E6S) | FORMAT_TIMESTAMP("%Y-%m-%d %H:%M:%E6S) |
| DATE | DATE | ||
| FLOAT64 | FLOAT | ||
| INT64 | INTEGER | ||
| NUMERIC | FLOAT | ||
| RECORD | STRING | TO_JSON_STRING | |
| STRING | STRING | TO_JSON_STRING | |
| STRUCT | STRING | TO_JSON_STRING | |
| TIMESTAMP | TIMESTAMP | FORMAT_TIMESTAMP("%Y-%m-%d %H:%M:%E6S) | FORMAT_TIMESTAMP("%Y-%m-%d %H:%M:%E6S) |
| TIME | TIME | ||
| GEOGRAPHY | STRING | ST_ASGEOJSON | TO_JSON_STRING |
| JSON | STRING | TO_JSON_STRING | TO_JSON_STRING |
| INTERVAL | STRING | TO_JSON_STRING | TO_JSON_STRING |