rshetye
rshetye

Reputation: 667

BigQuery datatypes

I am starting with a new project and just wanted to verify before defining the table schema

Does BigQuery support anything other than:

string – 
integer –
float– 
boolean – 

Upvotes: 8

Views: 23568

Answers (3)

Felipe Hoffa
Felipe Hoffa

Reputation: 59175

BigQuery data types official docs:


The previous answer lists the basic datatypes:

  • STRING
  • INTEGER (INT64)
  • FLOAT (FLOAT64)
  • BOOLEAN

BigQuery also supports:

  • RECORD (JSON objects, see nested records)
  • TIMESTAMP
  • BYTES
  • DATE
  • TIME
  • DATETIME
  • ARRAY
  • STRUCT

2018 and now also:

  • NUMERIC
  • GEOGRAPHY

More on:

Upvotes: 23

Roberto Landrau
Roberto Landrau

Reputation: 31

Boolean also support 1 for true and 0 for false and Timestamp supports UTC or "YYYY-MM-DD HH:MM:SSSS"

Upvotes: 1

Charles
Charles

Reputation: 590

Yes indeed.

BigQuery Type   ICD Type    Length    Checks

INTEGER         Integer     
FLOAT           Decimal     
STRING          Text        <65536  
BOOLEAN         Choice                "true" or "false", case-insensitive

https://developers.google.com/bigquery/articles/ingestionbestpractices#cutplace

Upvotes: 3

Related Questions