![]() |
Python Connector for Google BigQuery Data types - Python Connector for Google BigQuery |
![]() |
The following table describes the supported Google BigQuery data types and their mapping to the Python data types. The type codes returned in the description
cursor attribute can be used in the addtypecast()
cursor method.
BigQuery data type | Type code | Python data type |
---|---|---|
BOOLEAN |
3004 |
bool |
DATE |
3006 |
datetime.date |
DATETIME |
3007 |
datetime.datetime |
TIMESTAMP |
3007 |
datetime.datetime |
TIME |
3018 |
datetime.time |
NUMERIC |
3008 |
float |
BIGNUMERIC |
3008 |
float |
FLOAT64 |
3009 |
float |
INT64 |
3013 |
int |
BYTES |
3015 |
str |
STRING |
3017 |
str |
GEOGRAPHY |
3017 |
str |
ARRAY |
3017 |
str |
STRUCT |
3017 |
str |