BigQuery Format Options

class google.cloud.bigquery.format_options.AvroOptions()

Options if source format is set to AVRO.

classmethod from_api_repr(resource: Dict[str, bool])

Factory: construct an instance from a resource dict.

to_api_repr()

Build an API representation of this object.

  • Returns

    A dictionary in the format used by the BigQuery API.

  • Return type

    Dict[str, bool]

property use_avro_logical_types(: Optional[bool )

[Optional] If sourceFormat is set to ‘AVRO’, indicates whether to interpret logical types as the corresponding BigQuery data type (for example, TIMESTAMP), instead of using the raw type (for example, INTEGER).

See https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#AvroOptions.FIELDS.use_avro_logical_types

class google.cloud.bigquery.format_options.ParquetOptions()

Additional options if the PARQUET source format is used.

property enable_list_inference(: [bool](https://python.readthedocs.io/en/latest/library/functions.html#bool )

Indicates whether to use schema inference specifically for Parquet LIST logical type.

See https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#ParquetOptions.FIELDS.enable_list_inference

property enum_as_string(: [bool](https://python.readthedocs.io/en/latest/library/functions.html#bool )

Indicates whether to infer Parquet ENUM logical type as STRING instead of BYTES by default.

See https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#ParquetOptions.FIELDS.enum_as_string

classmethod from_api_repr(resource: Dict[str, bool])

Factory: construct an instance from a resource dict.

to_api_repr()

Build an API representation of this object.

  • Returns

    A dictionary in the format used by the BigQuery API.

  • Return type

    Dict[str, bool]