Module schema (3.36.0)

Schemas for BigQuery tables / queries.

Classes

FieldElementType

FieldElementType(element_type:str)

Represents the type of a field element.

Parameter
NameDescription
element_typestr

The type of a field element.

ForeignTypeInfo

ForeignTypeInfo(type_system:typing.Optional[str]=None)

Metadata about the foreign data type definition such as the system in which thetype is defined.

Parameter
NameDescription
type_systemstr

Required. Specifies the system which defines the foreign data type. TypeSystem enum currently includes: * "TYPE_SYSTEM_UNSPECIFIED" * "HIVE"

PolicyTagList

PolicyTagList(names:typing.Iterable[str]=())

Define Policy Tags for a column.

SchemaField

SchemaField(name:str,field_type:str,mode:str="NULLABLE",default_value_expression:typing.Optional[str]=None,description:typing.Union[str,google.cloud.bigquery.schema._DefaultSentinel]=_DefaultSentinel.DEFAULT_VALUE,fields:typing.Iterable[google.cloud.bigquery.schema.SchemaField]=(),policy_tags:typing.Union[google.cloud.bigquery.schema.PolicyTagList,None,google.cloud.bigquery.schema._DefaultSentinel,]=_DefaultSentinel.DEFAULT_VALUE,precision:typing.Union[int,google.cloud.bigquery.schema._DefaultSentinel]=_DefaultSentinel.DEFAULT_VALUE,scale:typing.Union[int,google.cloud.bigquery.schema._DefaultSentinel]=_DefaultSentinel.DEFAULT_VALUE,max_length:typing.Union[int,google.cloud.bigquery.schema._DefaultSentinel]=_DefaultSentinel.DEFAULT_VALUE,range_element_type:typing.Optional[typing.Union[google.cloud.bigquery.schema.FieldElementType,str]]=None,rounding_mode:typing.Optional[typing.Union[google.cloud.bigquery.enums.RoundingMode,str]]=None,foreign_type_definition:typing.Optional[str]=None,)

Describe a single field within a table schema.

SerDeInfo

SerDeInfo(serialization_library:str,name:typing.Optional[str]=None,parameters:typing.Optional[dict[str,str]]=None,)

Serializer and deserializer information.

Parameters
NameDescription
serialization_librarystr

Required. Specifies a fully-qualified class name of the serialization library that is responsible for the translation of data between table representation and the underlying low-level input and output format structures. The maximum length is 256 characters.

nameOptional[str]

Name of the SerDe. The maximum length is 256 characters.

StorageDescriptor

StorageDescriptor(input_format:typing.Optional[str]=None,location_uri:typing.Optional[str]=None,output_format:typing.Optional[str]=None,serde_info:typing.Optional[typing.Union[google.cloud.bigquery.schema.SerDeInfo,dict]]=None,)

Contains information about how a table's data is stored and accessed by opensource query engines.

Parameters
NameDescription
input_formatOptional[str]

Specifies the fully qualified class name of the InputFormat (e.g. "org.apache.hadoop.hive.ql.io.orc.OrcInputFormat"). The maximum length is 128 characters.

location_uriOptional[str]

The physical location of the table (e.g. 'gs://spark-dataproc-data/pangea-data/case_sensitive/' or 'gs://spark-dataproc-data/pangea-data/'). The maximum length is 2056 bytes.

output_formatOptional[str]

Specifies the fully qualified class name of the OutputFormat (e.g. "org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat"). The maximum length is 128 characters.

serde_infoUnion[SerDeInfo, dict, None]

Serializer and deserializer information.

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-12-16 UTC.