As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

google.cloud.bigquery.external_config.GoogleSheetsOptions

class google.cloud.bigquery.external_config.GoogleSheetsOptions[source]

Options that describe how to treat Google Sheets as BigQuery tables.

__init__()[source]

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

Methods

__init__()

Initialize self.

from_api_repr(resource)

Factory: construct a GoogleSheetsOptions instance given its API representation.

to_api_repr()

Build an API representation of this object.

Attributes

range

The range of a sheet that BigQuery will query from.

skip_leading_rows

The number of rows at the top of a sheet that BigQuery will skip when reading the data.

classmethod from_api_repr(resource)[source]

Factory: construct a GoogleSheetsOptions instance given its API representation.

Parameters

resource (Dict[str, Any]) – Definition of a GoogleSheetsOptions instance in the same representation as is returned from the API.

Returns

Configuration parsed from resource.

Return type

GoogleSheetsOptions

property range

The range of a sheet that BigQuery will query from.

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

Type

str

property skip_leading_rows

The number of rows at the top of a sheet that BigQuery will skip when reading the data.

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

Type

int

to_api_repr()[source]

Build an API representation of this object.

Returns

A dictionary in the format used by the BigQuery API.

Return type

Dict[str, Any]