Class ExternalConfig (3.11.4)

ExternalConfig(source_format)

Description of an external data source.

Parameter

NameDescription
source_format ExternalSourceFormat

See source_format.

Properties

autodetect

bool: If :data:True, try to detect schema and format options automatically.

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

avro_options

bigtable_options

compression

connection_id

Optional[str]: [Experimental] ID of a BigQuery Connection API resource.

.. WARNING::

This feature is experimental. Pre-GA features may have limited support, and changes to pre-GA features may not be compatible with other pre-GA versions.

csv_options

decimal_target_types

Possible SQL data types to which the source decimal values are converted.

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

.. versionadded:: 2.21.0

google_sheets_options

hive_partitioning

Optional[.external_config.HivePartitioningOptions]: [Beta] When set, it configures hive partitioning support.

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

ignore_unknown_values

bool: If :data:True, extra values that are not represented in the table schema are ignored. Defaults to :data:False.

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

max_bad_records

int: The maximum number of bad records that BigQuery can ignore when reading data.

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

options

Source-specific options.

parquet_options

reference_file_schema_uri

Optional[str]: When creating an external table, the user can provide a reference file with the table schema. This is enabled for the following formats:

AVRO, PARQUET, ORC

schema

source_format

source_uris

Methods

from_api_repr

from_api_repr(
    resource: dict,
) -> google.cloud.bigquery.external_config.ExternalConfig

Factory: construct an .external_config.ExternalConfig instance given its API representation.

Parameter
NameDescription
resource Dict[str, Any]

Definition of an .external_config.ExternalConfig instance in the same representation as is returned from the API.

Returns
TypeDescription
ExternalConfigConfiguration parsed from resource.

to_api_repr

to_api_repr() -> dict

Build an API representation of this object.

Returns
TypeDescription
Dict[str, Any]A dictionary in the format used by the BigQuery API.

__init__

__init__(source_format) -> None

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

ExternalConfig

ExternalConfig(source_format)

Description of an external data source.

Parameter
NameDescription
source_format ExternalSourceFormat

See source_format.