File tree Expand file tree Collapse file tree
bigquery/google/cloud/bigquery Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,3 +67,26 @@ def _make_sql_scalars_enum():
6767
6868
6969StandardSqlDataTypes = _make_sql_scalars_enum ()
70+
71+
72+ # See also: https://cloud.google.com/bigquery/data-types#legacy_sql_data_types
73+ # and https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types
74+ class SqlTypeNames (str , enum .Enum ):
75+ """Enum of allowed SQL type names in schema.SchemaField."""
76+
77+ STRING = "STRING"
78+ BYTES = "BYTES"
79+ INTEGER = "INTEGER"
80+ INT64 = "INTEGER"
81+ FLOAT = "FLOAT"
82+ FLOAT64 = "FLOAT"
83+ NUMERIC = "NUMERIC"
84+ BOOLEAN = "BOOLEAN"
85+ BOOL = "BOOLEAN"
86+ GEOGRAPHY = "GEOGRAPHY" # NOTE: not available in legacy types
87+ RECORD = "RECORD"
88+ STRUCT = "RECORD"
89+ TIMESTAMP = "TIMESTAMP"
90+ DATE = "DATE"
91+ TIME = "TIME"
92+ DATETIME = "DATETIME"
You can’t perform that action at this time.
0 commit comments