public void appendToTable(DataFile... dataFiles) {
    Preconditions.checkNotNull(table, "table not set");

    AppendFiles append = table.newAppend();

    for (DataFile dataFile : dataFiles) {
      append = append.appendFile(dataFile);
    }

    append.commit();
  }
Helper for appending {@link DataFile} to a table or appending {@link Record}s to a table.
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/data/GenericAppenderHelper.java