google.cloud.bigquery.external_config.ExternalConfig¶
- class google.cloud.bigquery.external_config.ExternalConfig(source_format)[source]¶
Description of an external data source.
- Parameters
source_format (ExternalSourceFormat) – See
source_format
.
- __init__(source_format) → None[source]¶
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(source_format)Initialize self.
from_api_repr
(resource)Factory: construct an
ExternalConfig
instance given its API representation.Build an API representation of this object.
Attributes
If
True
, try to detect schema and format options automatically.Additional properties to set if
sourceFormat
is set to AVRO.Additional properties to set if
sourceFormat
is set to BIGTABLE.The compression type of the data source.
[Experimental] ID of a BigQuery Connection API resource.
Additional properties to set if
sourceFormat
is set to CSV.Possible SQL data types to which the source decimal values are converted.
Additional properties to set if
sourceFormat
is set to GOOGLE_SHEETS.[Beta] When set, it configures hive partitioning support.
If
True
, extra values that are not represented in the table schema are ignored.The maximum number of bad records that BigQuery can ignore when reading data.
Source-specific options.
Additional properties to set if
sourceFormat
is set to PARQUET.Optional[str]: When creating an external table, the user can provide a reference file with the table schema.
The schema for the data.
ExternalSourceFormat
: Format of external source.URIs that point to your data in Google Cloud.
- property avro_options: Optional[google.cloud.bigquery.format_options.AvroOptions]¶
Additional properties to set if
sourceFormat
is set to AVRO.
- property bigtable_options: Optional[google.cloud.bigquery.external_config.BigtableOptions]¶
Additional properties to set if
sourceFormat
is set to BIGTABLE.
- property compression¶
The compression type of the data source.
- Type
- property connection_id¶
[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.
- Type
Optional[str]
- property csv_options: Optional[google.cloud.bigquery.external_config.CSVOptions]¶
Additional properties to set if
sourceFormat
is set to CSV.
- property decimal_target_types: Optional[FrozenSet[str]]¶
Possible SQL data types to which the source decimal values are converted.
New in version 2.21.0.
- classmethod from_api_repr(resource: dict) → google.cloud.bigquery.external_config.ExternalConfig[source]¶
Factory: construct an
ExternalConfig
instance given its API representation.- Parameters
resource (Dict[str, Any]) – Definition of an
ExternalConfig
instance in the same representation as is returned from the API.- Returns
Configuration parsed from
resource
.- Return type
- property google_sheets_options: Optional[google.cloud.bigquery.external_config.GoogleSheetsOptions]¶
Additional properties to set if
sourceFormat
is set to GOOGLE_SHEETS.
- property hive_partitioning¶
[Beta] When set, it configures hive partitioning support.
Note
Experimental. This feature is experimental and might change or have limited support.
- Type
Optional[
HivePartitioningOptions
]
- property ignore_unknown_values¶
If
True
, extra values that are not represented in the table schema are ignored. Defaults toFalse
.- Type
- property max_bad_records¶
The maximum number of bad records that BigQuery can ignore when reading data.
- Type
- property options: Optional[Union[google.cloud.bigquery.format_options.AvroOptions, google.cloud.bigquery.external_config.BigtableOptions, google.cloud.bigquery.external_config.CSVOptions, google.cloud.bigquery.external_config.GoogleSheetsOptions, google.cloud.bigquery.format_options.ParquetOptions]]¶
Source-specific options.
- property parquet_options: Optional[google.cloud.bigquery.format_options.ParquetOptions]¶
Additional properties to set if
sourceFormat
is set to PARQUET.
- property 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
- property schema¶
The schema for the data.
- Type
List[
SchemaField
]
- property source_format¶
ExternalSourceFormat
: Format of external source.