public void close() throws IOException {
      if (csvPrinter != null) {
        csvPrinter.close();
      }
    }
write data to 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/schema/AbstractSchemaTool.java