iceberg-python: [Bug] Cannot use PyIceberg with multiple FS

Apache Iceberg version

main (development)

Please describe the bug 🐞

PyIceberg assumes the same FS implementation is used for reading both metadata and data. However, I want to use a catalog with local FS as the warehouse while referencing S3 files as data.

See this example Jupyter notebook to reproduce

Problem

The fs implementation is determined by metadata location, which is then passed down to the function which reads the data file. https://github.com/apache/iceberg-python/blob/d8b5c17cadbc99e53d08ade6109283ee73f0d83e/pyiceberg/io/pyarrow.py#L1428-L1430

Possible solution

Determine fs implementation based on the file path of the current file

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (19 by maintainers)

Most upvoted comments

@jiakai-li we can close this issue! Fixed by #1453

At the meantime, I’m keen to work on the write.data.path and write.metadata.path if that’s something we want to enable and no one else is currently working on it?

Let’s open a new issue for those https://github.com/apache/iceberg-python/issues/1492

Hey guys, I can pick this up together with #1279 if no one is currently working on this.

I will make a PR according to this:

My preference is resolving fs at the file level. It’s more flexible and the performance difference should be negligible. Another reason is to be able to write data across clouds. Technically, I can write to multiple clouds, across AWS, Azure, and GCP.

My preference is resolving fs at the file level. It’s more flexible and the performance difference should be negligible. Another reason is to be able to write data across clouds. Technically, I can write to multiple clouds, across AWS, Azure, and GCP.

This is a good point, I’ve heard that folks store their metadata on HDFS, and the data itself on S3.

I don’t think the example with the add-files is the best, it would be better to support the write.data.path and write.metadata.path configuration