Skip to content

Commit afdbcfa

Browse files
jasonqngtswast
authored andcommitted
ENH: Convert calls to BigQuery API to use google-cloud-python (#25)
* Moved read_query to GbqConnector, update credentials and client generation to GbqConnector, and remove wait_for_job * Move sizeof_fmt back into GbqConnector * Convert rest of methods to use google-cloud-bigquery - Removes references to google-api-client-library and httplib2. - Updates PR to not make any surface-level changes to the API, only swaps out the dependencies. - Updates PR to use latest version of google-cloud-bigquery. * Ignore mode property when comparing schemas. * Document new dependency on google-cloud-bigquery. * Document dependencies for previous verions. Also says which libraries are no longer required, for easier upgrades. * Add deps and StreamingInsertError to changelog.
1 parent cd76dde commit afdbcfa

10 files changed

+231
-411
lines changed

ci/requirements-2.7-0.19.2.pip

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
google-api-python-client
21
google-auth
3-
google-auth-httplib2
42
google-auth-oauthlib
53
PyCrypto
6-
python-gflags
74
mock
5+
google-cloud-bigquery

ci/requirements-3.5-0.18.1.pip

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
google-api-python-client==1.6.0
21
google-auth==1.0.0
3-
google-auth-httplib2==0.0.1
42
google-auth-oauthlib==0.0.1
53
mock
4+
google-cloud-bigquery==0.28.0

ci/requirements-3.6-0.20.1.conda

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
google-api-python-client
21
google-auth
3-
google-auth-httplib2
42
google-auth-oauthlib
53
mock
4+
google-cloud-bigquery

ci/requirements-3.6-MASTER.pip

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
google-api-python-client
21
google-auth
3-
google-auth-httplib2
42
google-auth-oauthlib
53
mock
4+
google-cloud-bigquery

docs/source/changelog.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Changelog
22
=========
33

4+
0.3.0 / 2017-??-??
5+
------------------
6+
7+
- Use the `google-cloud-bigquery <https://googlecloudplatform.github.io/google-cloud-python/latest/bigquery/usage.html>`__ library for API calls. The ``google-cloud-bigquery`` package is a new dependency, and dependencies on ``google-api-python-client`` and ``httplib2`` are removed. See the `installation guide <https://pandas-gbq.readthedocs.io/en/latest/install.html#dependencies>`__ for more details. (:issue:`93`)
8+
- :func:`to_gbq` now uses a load job instead of the streaming API. (:issue:`75`)
9+
- Remove ``StreamingInsertError`` class, as it is no longer used by :func:`to_gbq`. (:issue:`75`)
10+
411
0.2.1 / 2017-11-27
512
------------------
613

docs/source/install.rst

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,17 @@ Dependencies
3737

3838
This module requires following additional dependencies:
3939

40-
- `httplib2 <https://github.com/httplib2/httplib2>`__: HTTP client
41-
- `google-api-python-client <http://github.com/google/google-api-python-client>`__: Google's API client
4240
- `google-auth <https://github.com/GoogleCloudPlatform/google-auth-library-python>`__: authentication and authorization for Google's API
4341
- `google-auth-oauthlib <https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib>`__: integration with `oauthlib <https://github.com/idan/oauthlib>`__ for end-user authentication
44-
- `google-auth-httplib2 <https://github.com/GoogleCloudPlatform/google-auth-library-python-httplib2>`__: adapter to use ``httplib2`` HTTP client with ``google-auth``
42+
- `google-cloud-bigquery <http://github.com/GoogleCloudPlatform/google-cloud-python>`__: Google Cloud client library for BigQuery
43+
44+
.. note::
45+
46+
The dependency on `google-cloud-bigquery <http://github.com/GoogleCloudPlatform/google-cloud-python>`__ is new in version 0.3.0 of ``pandas-gbq``.
47+
Versions less than 0.3.0 required the following dependencies:
48+
49+
- `httplib2 <https://github.com/httplib2/httplib2>`__: HTTP client (no longer required)
50+
- `google-api-python-client <http://github.com/google/google-api-python-client>`__: Google's API client (no longer required, replaced by `google-cloud-bigquery <http://github.com/GoogleCloudPlatform/google-cloud-python>`__:)
51+
- `google-auth <https://github.com/GoogleCloudPlatform/google-auth-library-python>`__: authentication and authorization for Google's API
52+
- `google-auth-oauthlib <https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib>`__: integration with `oauthlib <https://github.com/idan/oauthlib>`__ for end-user authentication
53+
- `google-auth-httplib2 <https://github.com/GoogleCloudPlatform/google-auth-library-python-httplib2>`__: adapter to use ``httplib2`` HTTP client with ``google-auth`` (no longer required)

0 commit comments

Comments
 (0)