Xiezhibin commented on code in PR #2249: URL: https://github.com/apache/iceberg-python/pull/2249#discussion_r2239074003
########## mkdocs/docs/api.md: ########## @@ -1004,6 +1004,33 @@ To show only data files or delete files in the current snapshot, use `table.insp Expert Iceberg users may choose to commit existing parquet files to the Iceberg table as data files, without rewriting them. +<!-- prettier-ignore-start --> + +!!! note "Name Mapping" +Because `add_files` uses existing files without writing new parquet files that are aware of the Iceberg's schema, it requires the Iceberg's table to have a [Name Mapping](https://iceberg.apache.org/spec/?h=name+mapping#name-mapping-serialization) (The Name mapping maps the field names within the parquet files to the Iceberg field IDs). Hence, `add_files` requires that there are no field IDs in the parquet file's metadata, and creates a new Name Mapping based on the table's current schema if the table doesn't already have one. Review Comment: Thank you for your reply. I will submit this! -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
