skip to main content
About the Driver : Using the Driver : Establishing a Connection : Connecting Using the JDBC Driver Manager : Passing the Connection URL with the Driver Manager
 
Passing the Connection URL with the Driver Manager
After registering the driver, the required connection information must be passed in the form of a connection URL.

Syntax

jdbc:datadirect:sparksql://servername:port[;property=value[;...]]
where:
servername
specifies the name or the IP address of the server to which you want to connect.
port
specifies the port number of the server listener. The default is 10000.
property=value
specifies connection property settings. Multiple properties are separated by a semi-colon.
This example shows how to establish a connection to an Apache Spark SQL database with user ID/password authentication:
Connection conn = DriverManager.getConnection
("jdbc:datadirect:sparksql://Server3:10000;
DatabaseName=MyDB;User=admin;Password=secret");