Skip to content

Commit 6f26e76

Browse files
busunkim96emar-kar
authored andcommitted
Change default endpoint to bigquery.googleapis.com (googleapis#9213)
1 parent dc741d6 commit 6f26e76

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

bigquery/google/cloud/bigquery/_http.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Connection(_http.JSONConnection):
2929
:param client_info: (Optional) instance used to generate user agent.
3030
"""
3131

32-
DEFAULT_API_ENDPOINT = "https://www.googleapis.com"
32+
DEFAULT_API_ENDPOINT = "https://bigquery.googleapis.com"
3333

3434
def __init__(self, client, client_info=None, api_endpoint=DEFAULT_API_ENDPOINT):
3535
super(Connection, self).__init__(client, client_info)

bigquery/google/cloud/bigquery/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
_MAX_MULTIPART_SIZE = 5 * 1024 * 1024
7979
_DEFAULT_NUM_RETRIES = 6
8080
_BASE_UPLOAD_TEMPLATE = (
81-
u"https://www.googleapis.com/upload/bigquery/v2/projects/"
81+
u"https://bigquery.googleapis.com/upload/bigquery/v2/projects/"
8282
u"{project}/jobs?uploadType="
8383
)
8484
_MULTIPART_URL_TEMPLATE = _BASE_UPLOAD_TEMPLATE + u"multipart"

bigquery/tests/unit/test_client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3127,7 +3127,7 @@ def _initiate_resumable_upload_helper(self, num_retries=None):
31273127
# Check the returned values.
31283128
self.assertIsInstance(upload, ResumableUpload)
31293129
upload_url = (
3130-
"https://www.googleapis.com/upload/bigquery/v2/projects/"
3130+
"https://bigquery.googleapis.com/upload/bigquery/v2/projects/"
31313131
+ self.PROJECT
31323132
+ "/jobs?uploadType=resumable"
31333133
)
@@ -3196,7 +3196,7 @@ def _do_multipart_upload_success_helper(self, get_boundary, num_retries=None):
31963196
get_boundary.assert_called_once_with()
31973197

31983198
upload_url = (
3199-
"https://www.googleapis.com/upload/bigquery/v2/projects/"
3199+
"https://bigquery.googleapis.com/upload/bigquery/v2/projects/"
32003200
+ self.PROJECT
32013201
+ "/jobs?uploadType=multipart"
32023202
)

bigquery/tests/unit/test_job.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def _make_job_resource(
7373
started=False,
7474
ended=False,
7575
etag="abc-def-hjk",
76-
endpoint="https://www.googleapis.com",
76+
endpoint="https://bigquery.googleapis.com",
7777
job_type="load",
7878
job_id="a-random-id",
7979
project_id="some-project",
@@ -1022,7 +1022,7 @@ class _Base(object):
10221022
from google.cloud.bigquery.dataset import DatasetReference
10231023
from google.cloud.bigquery.table import TableReference
10241024

1025-
ENDPOINT = "https://www.googleapis.com"
1025+
ENDPOINT = "https://bigquery.googleapis.com"
10261026
PROJECT = "project"
10271027
SOURCE1 = "http://example.com/source1.csv"
10281028
DS_ID = "dataset_id"

0 commit comments

Comments
 (0)