kevinjqliu commented on issue #601: URL: https://github.com/apache/iceberg-python/issues/601#issuecomment-2052628807
There's a [`Table.add_files` API](https://github.com/apache/iceberg-python/blob/5039b5d70644bc06c98349090912c6e9066d3ea1/mkdocs/docs/api.md#add-files) which supports directly adding parquet files. But it seems like the parquet files must have the same schema. You can also read all the parquet files into memory with PyArrow, merge the different schemas (using [pyarrow.unify_schemas](https://arrow.apache.org/docs/python/generated/pyarrow.unify_schemas.html)) and then write Arrow as Iceberg table. Maybe DuckDB works well here since `read_parquet` can union schemas, [see `union_by_name`](https://duckdb.org/docs/data/parquet/overview.html#parameters) and https://duckdb.org/docs/data/parquet/tips.html#use-union_by_name-when-loading-files-with-different-schemas -- 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