Fokko commented on code in PR #1635: URL: https://github.com/apache/iceberg-python/pull/1635#discussion_r1953222561
########## mkdocs/docs/configuration.md: ########## @@ -287,6 +287,55 @@ class UUIDLocationProvider(LocationProvider): return f"{prefix}/{partition_key.to_path()}/{data_file_name}" if partition_key else f"{prefix}/{data_file_name}" ``` +### Loading a Custom FileIO Implementation + +The `PyIceberg` library allows you to use custom FileIO implementations, enabling flexible file handling tailored to your specific needs. This feature is particularly useful when working with different storage backends or file formats. To implement a custom FileIO, you can specify the `PY_IO_IMPL` property in your configuration. The property should point to the custom FileIO class you wish to use. + +An example, custom `FileIO` implementation is shown below. + +```py +from pyiceberg.io import InputFile, OutputFile +from pyiceberg.io.fsspec import FsspecFileIO +from urllib.parse import urlparse +import os + +class RelativeFileIO(FsspecFileIO): Review Comment: I think this is a great PR, and appreciate that you took the time to add this. However, I'm not sure if the example is a good one. Iceberg is very opinionated about using absolute paths. For example, in the positional deletes, the absolute path is used to identify the data file to which it applies to. I'm not sure if this would work with having relative paths. Thoughts? Are you using this? If so, does it work well? :) -- 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