StandardSqlDataType

The type of a variable, e.g., a function argument. Examples: INT64: {typeKind="INT64"} ARRAY: {typeKind="ARRAY", arrayElementType="STRING"} STRUCT<x STRING, y ARRAY>: {typeKind="STRUCT", structType={fields=[ {name="x", type={typeKind="STRING"}}, {name="y", type={typeKind="ARRAY", arrayElementType="DATE"}} ]}}

JSON representation
{
  "typeKind": enum (TypeKind),

  // Union field sub_type can be only one of the following:
  "arrayElementType": {
    object (StandardSqlDataType)
  },
  "structType": {
    object (StandardSqlStructType)
  }
  // End of list of possible types for union field sub_type.
}
Fields
typeKind

enum (TypeKind)

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

Union field sub_type.

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".

TypeKind

Enums
TYPE_KIND_UNSPECIFIED Invalid type.
INT64 Encoded as a string in decimal format.
BOOL Encoded as a boolean "false" or "true".
FLOAT64 Encoded as a number, or string "NaN", "Infinity" or "-Infinity".
STRING Encoded as a string value.
BYTES Encoded as a base64 string per RFC 4648, section 4.
TIMESTAMP Encoded as an RFC 3339 timestamp with mandatory "Z" time zone string: 1985-04-12T23:20:50.52Z
DATE Encoded as RFC 3339 full-date format string: 1985-04-12
TIME Encoded as RFC 3339 partial-time format string: 23:20:50.52
DATETIME Encoded as RFC 3339 full-date "T" partial-time: 1985-04-12T23:20:50.52
GEOGRAPHY Encoded as WKT
NUMERIC Encoded as a decimal string.
ARRAY Encoded as a list with types matching Type.array_type.
STRUCT Encoded as a list with fields of type Type.struct_type[i]. tabledata.list is used because a JSON object cannot have duplicate field names.

StandardSqlStructType

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

object (StandardSqlField)

Segítségére volt ez az oldal? Tudassa velünk a véleményét:

Visszajelzés küldése a következővel kapcsolatban: