Skip to content

SNOW-2129602 Fix GCS staging by ensuring the endpoint has a scheme #2354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DESCRIPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
- Bumped numpy dependency from <2.1.0 to <=2.2.4
- Added Windows support for Python 3.13.
- Add `bulk_upload_chunks` parameter to `write_pandas` function. Setting this parameter to True changes the behaviour of write_pandas function to first write all the data chunks to the local disk and then perform the wildcard upload of the chunks folder to the stage. In default behaviour the chunks are being saved, uploaded and deleted one by one.
- Fix GCS staging by ensuring the endpoint has a scheme.
- Added support for new authentication mechanism PAT with external session ID.
- Added `client_fetch_use_mp` parameter that enables multiprocessed fetching of result batches.

Expand Down
2 changes: 2 additions & 0 deletions src/snowflake/connector/gcs_storage_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,8 @@ def get_location(
if endpoint:
if endpoint.endswith("/"):
endpoint = endpoint[:-1]
if not endpoint.startswith("https://"):
Copy link
Contributor

Choose a reason for hiding this comment

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

How about creating a test for that case?

endpoint = "https://" + endpoint
return GcsLocation(bucket_name=container_name, path=path, endpoint=endpoint)
elif use_virtual_url:
return GcsLocation(
Expand Down
Loading