Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

Settings for SQL querying:

driverName = "org.apache.hive.jdbc.HiveDriver";
connectionUrl =  "jdbc:hive2://" + webPortalIp + ":" + webPortalPort+ "/;transportMode=http;httpPath=kyvos/sql";
Username = Username of Kyvos webportal;
Password = Password of Kyvos webportal;        
public static java.sql.Connection getSQLConnection(String driverName,String connectionUrl,String Username,String Password) throws ClassNotFoundException, SQLException
    {
        try {
            Class.forName(driverName);            
        } catch (Exception e)    {
            e.printStackTrace();
        }
        return java.sql.DriverManager.getConnection(connectionUrl,Username, Password);
}

This will return the connection object through which user can run SQL query using JDBC connection.

  • No labels