-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use name and type comparising when appending a dataframe into table
I modified GbqConnector.verify_schema function to parse name and type from the remote schema (basically dropping mode) and include those in the compared fields. Currently, when appending to a BQ table, comparison between the destination table's schema and a dataframe schema is done over superset of a BQ schema definition (name, type, mode) when _generate_bq_schema parses only name and type from a dataframe. IMO it would be inconvenient to make the mode check in the module by generating completeness of columns (includes null values or not). So raising a generic GBQ error is more convenient here. closes #13 Author: Matti Remes <[email protected]> Closes #14 from mremes/master and squashes the following commits: bf8c378 [Matti Remes] added reference to issue #13 77b1fd5 [Matti Remes] changelog for verify_schema changes 70d08ef [Matti Remes] make the syntax of the test flake-pretty 45826f1 [Matti Remes] Merge remote-tracking branch 'upstream/master' 66aa616 [Matti Remes] Added test for validate_schema ignoring field mode when comparing schemas 5dafd55 [Matti Remes] fix bug with selecting key 631d66c [Matti Remes] Use name and type of fields for comparing remote and local schemas when appending to a table
- Loading branch information
Showing
4 changed files
with
39 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
Changelog | ||
========= | ||
|
||
0.2.0 / 2017-? | ||
-------------- | ||
0.2.0 / 2017-03-?? | ||
------------------ | ||
|
||
- Bug with appending to a BigQuery table where fields have modes (NULLABLE,REQUIRED,REPEATED) specified. These modes were compared versus the remote schema and writing a table via ``to_gbq`` would previously raise. (:issue:`13`) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jreback
Contributor
|
||
|
||
0.1.2 / 2017-02-23 | ||
------------------ | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -353,6 +353,5 @@ | |
intersphinx_mapping = {'https://docs.python.org/': None} | ||
|
||
extlinks = {'issue': ('https://github.com/pydata/pandas-gbq/issues/%s', | ||
'GH'), | ||
'wiki': ('https://github.com/pydata/pandas-gbq/wiki/%s', | ||
'wiki ')} | ||
'GH#'), | ||
'pr': ('https://github.com/pydata/pandas-gbq/pull/%s', 'GH#')} | ||
This comment has been minimized.
Sorry, something went wrong.
jorisvandenbossche
|
This file contains 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
This file contains 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
@jorisvandenbossche you have any idea why the issue reference is not showing up correctly? (its the same when I build locally and on RTD): https://pandas-gbq.readthedocs.io/en/latest/changelog.html#id2