This page describes the data types that Google BigQuery supports.
Your data can include the following data types:
|Data type||Possible values|
|STRING||Variable-length character (UTF-8) data.|
Variable-length binary data.
|INTEGER||64-bit signed integer.|
|FLOAT||Double-precision floating-point format.|
|RECORD||A collection of one or more other fields.|
You can describe TIMESTAMP data types as either UNIX timestamps or calendar datetimes. BigQuery stores TIMESTAMP data internally as a UNIX timestamp with microsecond precision.
A positive or negative decimal number. A positive number specifies the number of seconds since the epoch (1970-01-01 00:00:00 UTC), and a negative number specifies the number of seconds before the epoch. Up to 6 decimal places (microsecond precision) are preserved.
Date and time strings
A date and time string in the format
You can supply a timezone offset in your date and time strings, but BigQuery doesn't preserve the offset after converting the value to its internal format. If you need to preserve the original timezone data, store the timezone offset in a separate column.
Date and time strings must be quoted when using JSON format.
The following examples show identical ways of describing specific dates, in both UNIX timestamp and date and time string formats.
- To set a field's data type using the API, see schema.fields.type.