mohsenify commented on issue #12652:
URL: https://github.com/apache/iceberg/issues/12652#issuecomment-2764581395

   @nastra  Of course, here’s the writer code I forgot to send earlier:
   
   ```
     private DataFile writeRecordsToFile(String filePath, List<Record> records, 
Table table) {
   
       try (FileIO io = table.io();
            DataWriter<Record> dataWriter = 
Parquet.writeData(io.newOutputFile(filePath))
                .schema(table.schema())
                .createWriterFunc(GenericParquetWriter::buildWriter)
                .overwrite()
                .withSpec(table.spec())
                .build()) {
         try (dataWriter) {
           records.forEach(dataWriter::write);
         }
         return dataWriter.toDataFile();
       } catch (IOException e) {
   //
       }
     }
   
   ```


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