Skip to content

Commit

Permalink
Change default endpoint to bigquery.googleapis.com (googleapis#9213)
Browse files Browse the repository at this point in the history
  • Loading branch information
busunkim96 authored and emar-kar committed Sep 18, 2019
1 parent 58f6b8f commit 0556f1d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bigquery/google/cloud/bigquery/_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Connection(_http.JSONConnection):
:param client_info: (Optional) instance used to generate user agent.
"""

DEFAULT_API_ENDPOINT = "https://www.googleapis.com"
DEFAULT_API_ENDPOINT = "https://bigquery.googleapis.com"

def __init__(self, client, client_info=None, api_endpoint=DEFAULT_API_ENDPOINT):
super(Connection, self).__init__(client, client_info)
Expand Down
2 changes: 1 addition & 1 deletion bigquery/google/cloud/bigquery/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
_MAX_MULTIPART_SIZE = 5 * 1024 * 1024
_DEFAULT_NUM_RETRIES = 6
_BASE_UPLOAD_TEMPLATE = (
u"https://www.googleapis.com/upload/bigquery/v2/projects/"
u"https://bigquery.googleapis.com/upload/bigquery/v2/projects/"
u"{project}/jobs?uploadType="
)
_MULTIPART_URL_TEMPLATE = _BASE_UPLOAD_TEMPLATE + u"multipart"
Expand Down
4 changes: 2 additions & 2 deletions bigquery/tests/unit/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3127,7 +3127,7 @@ def _initiate_resumable_upload_helper(self, num_retries=None):
# Check the returned values.
self.assertIsInstance(upload, ResumableUpload)
upload_url = (
"https://www.googleapis.com/upload/bigquery/v2/projects/"
"https://bigquery.googleapis.com/upload/bigquery/v2/projects/"
+ self.PROJECT
+ "/jobs?uploadType=resumable"
)
Expand Down Expand Up @@ -3196,7 +3196,7 @@ def _do_multipart_upload_success_helper(self, get_boundary, num_retries=None):
get_boundary.assert_called_once_with()

upload_url = (
"https://www.googleapis.com/upload/bigquery/v2/projects/"
"https://bigquery.googleapis.com/upload/bigquery/v2/projects/"
+ self.PROJECT
+ "/jobs?uploadType=multipart"
)
Expand Down
4 changes: 2 additions & 2 deletions bigquery/tests/unit/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _make_job_resource(
started=False,
ended=False,
etag="abc-def-hjk",
endpoint="https://www.googleapis.com",
endpoint="https://bigquery.googleapis.com",
job_type="load",
job_id="a-random-id",
project_id="some-project",
Expand Down Expand Up @@ -1022,7 +1022,7 @@ class _Base(object):
from google.cloud.bigquery.dataset import DatasetReference
from google.cloud.bigquery.table import TableReference

ENDPOINT = "https://www.googleapis.com"
ENDPOINT = "https://bigquery.googleapis.com"
PROJECT = "project"
SOURCE1 = "http://example.com/source1.csv"
DS_ID = "dataset_id"
Expand Down

0 comments on commit 0556f1d

Please sign in to comment.