helmiazizm commented on code in PR #1788:
URL: https://github.com/apache/iceberg-python/pull/1788#discussion_r2002796293


##########
pyiceberg/io/fsspec.py:
##########
@@ -124,6 +128,22 @@ def _file(_: Properties) -> LocalFileSystem:
     return LocalFileSystem(auto_mkdir=True)
 
 
+def _oss(properties: Properties) -> AbstractFileSystem:
+    from s3fs import S3FileSystem
+
+    client_kwargs = {
+        "endpoint_url": properties.get(OSS_ENDPOINT),
+        "aws_access_key_id": properties.get(OSS_ACCESS_KEY_ID),
+        "aws_secret_access_key": properties.get(OSS_ACCESS_KEY_SECRET),
+        "aws_session_token": properties.get(OSS_SESSION_TOKEN),
+    }
+    config_kwargs = {"s3": {"addressing_style": "virtual"}, 
"signature_version": "v4"}

Review Comment:
   To be honest, I'm not entirely sure which `config_kwargs` keys supported by 
s3fs that can work with OSS connection. The documentation for `boto3` 
compatibility only mentioned setting several keys: 
https://www.alibabacloud.com/help/en/oss/developer-reference/use-amazon-s3-sdks-to-access-oss#section-jmf-a67-hat
   
   Do you think it'll make sense to copy the `config_kwargs` setting for S3 but 
with `oss.config-example` parameter?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to