samredai commented on code in PR #5332:
URL: https://github.com/apache/iceberg/pull/5332#discussion_r956806888


##########
python/pyiceberg/io/fsspec.py:
##########
@@ -0,0 +1,201 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+"""FileIO implementation for reading and writing table files that uses fsspec 
compatible filesystems"""
+
+from typing import Dict, Union
+from urllib.parse import urlparse
+
+from fsspec import AbstractFileSystem
+
+from pyiceberg.io import FileIO, InputFile, OutputFile
+from pyiceberg.typedef import EMPTY_DICT, Properties
+
+
+def _s3(properties: Properties, **fs_properties) -> AbstractFileSystem:
+    from s3fs import S3FileSystem
+
+    client_kwargs = {
+        "endpoint_url": properties.get("s3.endpoint"),
+        "aws_access_key_id": properties.get("s3.access-key-id"),
+        "aws_secret_access_key": properties.get("s3.secret-access-key"),

Review Comment:
   Some other options that may be good to add are:
   - **aws_session_token** (string) -- The session token to use when creating 
the client. Same semantics as aws_access_key_id above.
   - **use_ssl** (boolean) -- Whether or not to use SSL. By default, SSL is 
used. Note that not all services support non-ssl connections.
   - **region_name** (string) -- The name of the region associated with the 
client. A client is associated with a single region.
   
   There's also an `s3_additional_kwargs` map that lets you set things like 
sse. I'll look closer at those options and map them to the java ones.



-- 
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