greenlaw commented on issue #2428:
URL: 
https://github.com/apache/iceberg-python/issues/2428#issuecomment-3256631431

   Yes, it does. With the Java API I'm able to use 
[AppendFiles](https://iceberg.apache.org/javadoc/latest/org/apache/iceberg/AppendFiles.html),
 which supports 
[toBranch()](https://iceberg.apache.org/javadoc/latest/org/apache/iceberg/SnapshotUpdate.html#toBranch(java.lang.String))
 along with 
[DataFiles.builder](https://iceberg.apache.org/javadoc/latest/org/apache/iceberg/DataFiles.Builder.html)
   
   The code looks something like:
   
   ```
   AppendFiles append = table.newAppend().toBranch("my_branch");
   InputFile inputFile = HadoopInputFile.fromLocation(uri, hadoopConf);
   Metrics metrics = ParquetUtil.fileMetrics(inputFile, metricsConfig);
   DataFile file = DataFiles.builder(table.spec())
                 .withPath(path)
                 .withFormat(FileFormat.PARQUET)
                 .withFileSizeInBytes(inputFile.getLength())
                 .withMetrics(metrics)
                 .build();
   append.appendFile(file);
   append.commit();
   ```


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

Reply via email to