FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: validate job_config.source_format in load_table_from_dataframe by HemangChothani · Pull Request #262 · googleapis/python-bigquery · GitHub

This repository was archived by the owner on Mar 6, 2026. It is now read-only.
/ python-bigquery Public archive

fix: validate job_config.source_format in load_table_from_dataframe - #262

Merged
tswast merged 2 commits into
googleapis:masterfrom
MaxxleLLC:bigquery_issue_261
Sep 18, 2020
Merged

fix: validate job_config.source_format in load_table_from_dataframe#262
tswast merged 2 commits into
googleapis:masterfrom
MaxxleLLC:bigquery_issue_261

Conversation

Copy link
Copy Markdown
Contributor

Fixes #261

HemangChothani requested review from a team, plamut and tswast September 17, 2020 09:26
google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 17, 2020

tswast left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks for the quick response! A few suggested update to the error message.

Comment thread google/cloud/bigquery/client.py Outdated
if job_config.source_format:
if job_config.source_format is not job.SourceFormat.PARQUET:
raise ValueError(
"Cannot pass `{}` as a ``source_format``, currently PARQUET is supported".format(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
"Cannot pass `{}` as a ``source_format``, currently PARQUET is supported".format(
"Got unexpected source_format: '{}'. Currently, only PARQUET is supported".format(

Comment thread tests/unit/test_client.py Outdated
dataframe, self.TABLE_REF, job_config=job_config, location=self.LOCATION
)

assert "Cannot pass" in str(exc.value)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
assert "Cannot pass" in str(exc.value)
assert "Got unexpected source_format:" in str(exc.value)

tswast changed the title fix: address job_congig.source_format fix: validate job_config.source_format in load_table_from_dataframe Sep 17, 2020

plamut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Seems fine apart from that gotcha that might bite us at some future point.

Comment thread google/cloud/bigquery/client.py Outdated
product-auto-label Bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Sep 18, 2020
tswast merged commit 6160fee into googleapis:master Sep 18, 2020
gcf-merge-on-green Bot pushed a commit that referenced this pull request Sep 22, 2020
🤖 I have created a release \*beep\* \*boop\* 
---
## [1.28.0](https://www.github.com/googleapis/python-bigquery/compare/v1.27.2...v1.28.0) (2020-09-22)


### Features

* add custom cell magic parser to handle complex `--params` values ([#213](https://www.github.com/googleapis/python-bigquery/issues/213)) ([dcfbac2](https://www.github.com/googleapis/python-bigquery/commit/dcfbac267fbf66d189b0cc7e76f4712122a74b7b))
* add instrumentation to list methods ([#239](https://www.github.com/googleapis/python-bigquery/issues/239)) ([fa9f9ca](https://www.github.com/googleapis/python-bigquery/commit/fa9f9ca491c3f9954287102c567ec483aa6151d4))
* add opentelemetry tracing ([#215](https://www.github.com/googleapis/python-bigquery/issues/215)) ([a04996c](https://www.github.com/googleapis/python-bigquery/commit/a04996c537e9d8847411fcbb1b05da5f175b339e))
* expose require_partition_filter for hive_partition ([#257](https://www.github.com/googleapis/python-bigquery/issues/257)) ([aa1613c](https://www.github.com/googleapis/python-bigquery/commit/aa1613c1bf48c7efb999cb8b8c422c80baf1950b))


### Bug Fixes

* fix dependency issue in fastavro ([#241](https://www.github.com/googleapis/python-bigquery/issues/241)) ([2874abf](https://www.github.com/googleapis/python-bigquery/commit/2874abf4827f1ea529519d4b138511d31f732a50))
* update minimum dependency versions ([#263](https://www.github.com/googleapis/python-bigquery/issues/263)) ([1be66ce](https://www.github.com/googleapis/python-bigquery/commit/1be66ce94a32b1f924bdda05d068c2977631af9e))
* validate job_config.source_format in load_table_from_dataframe ([#262](https://www.github.com/googleapis/python-bigquery/issues/262)) ([6160fee](https://www.github.com/googleapis/python-bigquery/commit/6160fee4b1a79b0ea9031cc18caf6322fe4c4084))


### Documentation

* recommend insert_rows_json to avoid call to tables.get ([#258](https://www.github.com/googleapis/python-bigquery/issues/258)) ([ae647eb](https://www.github.com/googleapis/python-bigquery/commit/ae647ebd68deff6e30ca2cffb5b7422c6de4940b))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigquery Issues related to the googleapis/python-bigquery API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting job_config.source_format is ignored by load_table_from_dataframe

3 participants


Back | FazBrowse Home | New Git URL