skip to main content
Getting Started : Quick Start Connect : Passing the Connection URL
 

Passing the Connection URL

After registering the driver, the required connection information needs to be passed in the form of a connection URL. The connection URL takes the form:
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 a server with user ID/password authentication:
Connection conn = DriverManager.getConnection
("jdbc:datadirect:sparksql://Server3:10000;
DatabaseName=Test;User=admin;Password=adminpass");