public final class Exporter extends Object
ResultSet
to CSV format. Use the Exporter.Builder
to configure the Exporter
before calling its csvDump()
method. For example:
Exporter exporter = new Exporter.Builder() .setDelimiter(",") .build(); ResultSet rs = ...; exporter.csvDump(rs, System.out);
Modifier and Type | Class and Description |
---|---|
static class |
Exporter.Builder
Builder for
Exporter . |
Modifier and Type | Method and Description |
---|---|
void |
dumpCsv(ResultSet rs,
PrintStream out)
Prints the ResultSet
rs in CSV format to the output file out . |
void |
dumpSchema(ResultSet rs,
PrintStream out)
Prints the Google BigQuery schema of the table given by
rs in JSON format to the out stream. |
public void dumpCsv(ResultSet rs, PrintStream out) throws SQLException, IOException
rs
in CSV format to the output file out
.SQLException
IOException
public void dumpSchema(ResultSet rs, PrintStream out) throws SQLException, IOException
rs
in JSON format to the out
stream. See
https://cloud.google.com/bigquery/bq-command-line-tool for a description of the JSON schema format.SQLException
IOException
Copyright © 2012–2018 UCanAccess. All rights reserved.