Class SchemaField (1.17.0)

SchemaField(name, field_type, mode="NULLABLE", description=None, fields=())

Describe a single field within a table schema.

Parameters

Name Description
name str

the name of the field.

description Optional[str]

description for the field.

fields Tuple[SchemaField]

subfields (requires field_type of 'RECORD').

Inheritance

builtins.object > SchemaField

Properties

description

Optional[str]: description for the field.

field_type

fields

tuple: Subfields contained in this field.

Must be empty unset if field_type is not 'RECORD'.

is_nullable

bool: whether 'mode' is 'nullable'.

mode

name

str: The name of the field.

Methods

__init__

__init__(name, field_type, mode="NULLABLE", description=None, fields=())

Initialize self. See help(type(self)) for accurate signature.

from_api_repr

from_api_repr(api_repr)

Return a SchemaField object deserialized from a dictionary.

Parameter
Name Description
api_repr Mapping[str, str]

The serialized representation of the SchemaField, such as what is output by to_api_repr.

Returns
Type Description
google.cloud.biquery.schema.SchemaField The ``SchemaField`` object.

to_api_repr

to_api_repr()

Return a dictionary representing this schema field.

Returns
Type Description
dict A dictionary representing the SchemaField in a serialized form.

SchemaField

SchemaField(name, field_type, mode="NULLABLE", description=None, fields=())

Describe a single field within a table schema.

Parameters
Name Description
name str

the name of the field.

description Optional[str]

description for the field.

fields Tuple[SchemaField]

subfields (requires field_type of 'RECORD').

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

Last updated 2025年10月30日 UTC.