StandardSqlDataType

The data type of a variable such as a function argument. Examples include:

  • INT64:{"typeKind": "INT64"}

  • ARRAY:

{  "typeKind": "ARRAY",  "arrayElementType": {"typeKind": "STRING"}}
  • STRUCT<x STRING, y ARRAY>:
{  "typeKind": "STRUCT",  "structType":  {    "fields":    [      {        "name": "x",        "type": {"typeKind": "STRING"}      },      {        "name": "y",        "type":        {          "typeKind": "ARRAY",          "arrayElementType": {"typeKind": "DATE"}        }      }    ]  }}
  • RANGE:
{  "typeKind": "RANGE",  "rangeElementType": {"typeKind": "DATE"}}
JSON representation
{"typeKind":enum (TypeKind),// Union fieldsub_type can be only one of the following:"arrayElementType":{object (StandardSqlDataType)},"structType":{object (StandardSqlStructType)},"rangeElementType":{object (StandardSqlDataType)}// End of list of possible types for union fieldsub_type.}
Fields
typeKind

enum (TypeKind)

Required. The top level type of this field. Can be any GoogleSQL data type (e.g., "INT64", "DATE", "ARRAY").

Union fieldsub_type. For complex types, the sub type information.sub_type can be only one of the following:
arrayElementType

object (StandardSqlDataType)

The type of the array's elements, if typeKind = "ARRAY".

structType

object (StandardSqlStructType)

The fields of this struct, in order, if typeKind = "STRUCT".

rangeElementType

object (StandardSqlDataType)

The type of the range's elements, if typeKind = "RANGE".

TypeKind

The kind of the datatype.

Enums
TYPE_KIND_UNSPECIFIEDInvalid type.
INT64Encoded as a string in decimal format.
BOOLEncoded as a boolean "false" or "true".
FLOAT64Encoded as a number, or string "NaN", "Infinity" or "-Infinity".
STRINGEncoded as a string value.
BYTESEncoded as a base64 string per RFC 4648, section 4.
TIMESTAMPEncoded as an RFC 3339 timestamp with mandatory "Z" time zone string: 1985-04-12T23:20:50.52Z
DATEEncoded as RFC 3339 full-date format string: 1985-04-12
TIMEEncoded as RFC 3339 partial-time format string: 23:20:50.52
DATETIMEEncoded as RFC 3339 full-date "T" partial-time: 1985-04-12T23:20:50.52
GEOGRAPHYEncoded as WKT
NUMERICEncoded as a decimal string.
BIGNUMERICEncoded as a decimal string.
JSONEncoded as a string.
ARRAYEncoded as a list with types matching Type.array_type.
STRUCTEncoded as a list with fields of type Type.struct_type[i]. tabledata.list is used because a JSON object cannot have duplicate field names.
RANGEEncoded as a pair with types matching rangeElementType. Pairs must begin with "[", end with ")", and be separated by ", ".

StandardSqlStructType

The representation of a SQL STRUCT type.

JSON representation
{"fields":[{object (StandardSqlField)}]}
Fields
fields[]

object (StandardSqlField)

Fields within the struct.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-02 UTC.