Search in sources :

Example 1 with FileSink

use of com.questdb.std.str.FileSink in project questdb by bluestreak01.

the class ExportManager method export.

public static void export(RecordSource from, ReaderFactory factory, File to, char delimiter) throws JournalException, IOException {
    if (to.isDirectory()) {
        throw new JournalException(to + "cannot be a directory");
    }
    try (FileSink sink = new FileSink(to)) {
        RecordSourcePrinter printer = new RecordSourcePrinter(sink, delimiter);
        printer.print(from, factory, true);
    }
}
Also used : JournalException(com.questdb.std.ex.JournalException) RecordSourcePrinter(com.questdb.ql.RecordSourcePrinter) FileSink(com.questdb.std.str.FileSink)

Aggregations

RecordSourcePrinter (com.questdb.ql.RecordSourcePrinter)1 JournalException (com.questdb.std.ex.JournalException)1 FileSink (com.questdb.std.str.FileSink)1