google.cloud.bigquery.external_config.CSVOptions¶
-
class
google.cloud.bigquery.external_config.
CSVOptions
[source]¶ Options that describe how to treat CSV files as BigQuery tables.
Methods
__init__
()Initialize self.
from_api_repr
(resource)Factory: construct a
CSVOptions
instance given its API representation.Build an API representation of this object.
Attributes
If
True
, BigQuery treats missing trailing columns as null values.If
True
, quoted data sections that contain newline characters in a CSV file are allowed.The character encoding of the data.
The separator for fields in a CSV file.
The value that is used to quote data sections in a CSV file.
The number of rows at the top of a CSV file.
-
property
allow_jagged_rows
¶ If
True
, BigQuery treats missing trailing columns as null values. Defaults toFalse
.See https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#CsvOptions.FIELDS.allow_jagged_rows
- Type
-
property
allow_quoted_newlines
¶ If
True
, quoted data sections that contain newline characters in a CSV file are allowed. Defaults toFalse
.- Type
-
property
encoding
¶ The character encoding of the data.
See https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#CsvOptions.FIELDS.encoding
- Type
-
property
field_delimiter
¶ The separator for fields in a CSV file. Defaults to comma (‘,’).
See https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#CsvOptions.FIELDS.field_delimiter
- Type
-
classmethod
from_api_repr
(resource)[source]¶ Factory: construct a
CSVOptions
instance given its API representation.- Parameters
resource (Dict[str, Any]) – Definition of a
CSVOptions
instance in the same representation as is returned from the API.- Returns
Configuration parsed from
resource
.- Return type
-
property
quote_character
¶ The value that is used to quote data sections in a CSV file.
See https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#CsvOptions.FIELDS.quote
- Type
-
property
skip_leading_rows
¶ The number of rows at the top of a CSV file.
See https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#CsvOptions.FIELDS.skip_leading_rows
- Type
-
property