Skip to content

Commit

Permalink
SNOW-1258702:SnowSQL File Upload support for China (#1932)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-yuwang authored Apr 23, 2024
1 parent 5dc3c47 commit 89eecda
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
# Release Notes

- v3.10.0 (TBD)
- Added support for structured types to fetch_pandas_all
- Added support for structured types to fetch_pandas_all.
- Fixed an issue that endpoint for China s3 is not formed correctly.

- v3.9.1(April 22,2024)

Expand Down
8 changes: 5 additions & 3 deletions src/snowflake/connector/s3_storage_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,11 @@ def transfer_accelerate_config(
self, use_accelerate_endpoint: bool | None = None
) -> bool:
# accelerate cannot be used in China and us government
if (self.location_type and "S3China".lower() in self.location_type.lower()) or (
self.region_name and self.region_name.startswith("cn-")
):
if self.region_name and self.region_name.startswith("cn-"):
self.endpoint = (
f"https://{self.s3location.bucket_name}."
f"s3.{self.region_name}.amazonaws.com.cn"
)
return False
# if self.endpoint has been set, e.g. by metadata, no more config is needed.
if self.endpoint is not None:
Expand Down

0 comments on commit 89eecda

Please sign in to comment.