One way to connect to a service is through the JDBC DriverManager using the DriverManager.getConnection() method. As the following examples show, this method specifies a string containing a connection URL.

UserID/Password authentication

Connection conn = DriverManager.getConnection
("jdbc:datadirect:impala://Server3:21050;DatabaseName=database_name;
  UserName=user_name;Password=password");
Note: See User ID/password authentication for details.