public void printRecord(final Iterable<?> values) throws IOException {
      if (csvPrinter == null) {
        csvPrinter = csvFormat.print(new PrintWriter(filePath));
      }
      csvPrinter.printRecord(values);
    }
write data to CSV file.

@param headerNames the header names of CSV file
@param records the records of CSV file
@param filePath the directory to save the file
iotdb-client/cli/src/main/java/org/apache/iotdb/tool/data/AbstractDataTool.java