Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add AvroOptions to configure AVRO external data #994

Merged
merged 6 commits into from Sep 30, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 5 additions & 10 deletions google/cloud/bigquery/external_config.py
Expand Up @@ -825,8 +825,7 @@ def schema(self, value):

@property
def avro_options(self) -> Optional[AvroOptions]:
"""Optional[google.cloud.bigquery.format_options.AvroOptions]:
Additional properties to set if ``sourceFormat`` is set to AVRO.
"""Additional properties to set if ``sourceFormat`` is set to AVRO.

See:
https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#ExternalDataConfiguration.FIELDS.avro_options
Expand All @@ -849,8 +848,7 @@ def avro_options(self, value):

@property
def bigtable_options(self) -> Optional[BigtableOptions]:
"""Optional[google.cloud.bigquery.external_config.BigtableOptions]:
Additional properties to set if ``sourceFormat`` is set to BIGTABLE.
"""Additional properties to set if ``sourceFormat`` is set to BIGTABLE.

See:
https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#ExternalDataConfiguration.FIELDS.bigtable_options
Expand All @@ -873,8 +871,7 @@ def bigtable_options(self, value):

@property
def csv_options(self) -> Optional[CSVOptions]:
"""Optional[google.cloud.bigquery.external_config.CSVOptions]:
Additional properties to set if ``sourceFormat`` is set to CSV.
"""Additional properties to set if ``sourceFormat`` is set to CSV.

See:
https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#ExternalDataConfiguration.FIELDS.csv_options
Expand All @@ -897,8 +894,7 @@ def csv_options(self, value):

@property
def google_sheets_options(self) -> Optional[GoogleSheetsOptions]:
"""Optional[google.cloud.bigquery.external_config.GoogleSheetsOptions]:
Additional properties to set if ``sourceFormat`` is set to
"""Additional properties to set if ``sourceFormat`` is set to
GOOGLE_SHEETS.
Copy link
Contributor

@plamut plamut Sep 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit) Does this fit into a single line? (IIRC the summary in the docs only grabs the first line)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not within 79 characters, which is what I've got VS Code configured to wrap at.

Looks like Sphinx did the right thing. Probably because there's no blank line.

Screen Shot 2021-09-30 at 11 52 47 AM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that surprised me, but even better then!


See:
Expand All @@ -922,8 +918,7 @@ def google_sheets_options(self, value):

@property
def parquet_options(self) -> Optional[ParquetOptions]:
"""Optional[google.cloud.bigquery.format_options.ParquetOptions]:
Additional properties to set if ``sourceFormat`` is set to PARQUET.
"""Additional properties to set if ``sourceFormat`` is set to PARQUET.

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