Code example for Connection

Methods: getMetaData

  public static int verticaVersion(Configuration conf, boolean output) throws IOException {
    int ver = -1;
    try { 
    VerticaConfiguration vtconfig = new VerticaConfiguration(conf);
    Connection conn = vtconfig.getConnection(output);
    DatabaseMetaData dbmd = conn.getMetaData();
    ver = dbmd.getDatabaseMajorVersion() * 100;
    ver += dbmd.getDatabaseMinorVersion();
    } catch(ClassNotFoundException e) { 
      throw new IOException("Vertica Driver required to use Vertica Input or Output Formatters"); 
    } catch (SQLException e) { throw new IOException(e); }
    return ver;
  public static void checkOutputSpecs(Configuration conf) throws IOException {
    VerticaConfiguration vtconfig = new VerticaConfiguration(conf);
    String writerTable = vtconfig.getOutputTableName();
    if (writerTable == null)
      throw new IOException("Vertica output requires a table name defined by "
Connect your IDE to all the code out there  Get Codota for Java