Connecting with the JDBC Driver Manager
- Last Updated: January 11, 2018
- 1 minute read
- DataDirect Connectors
- JDBC
- Apache Spark SQL 6.0
- Documentation
One way to connect to a Spark SQL database is through the JDBC DriverManager using the DriverManager.getConnection() method. As the following example shows, this method specifies a string containing a connection URL.
Connection conn = DriverManager.getConnection
("jdbc:datadirect:sparksql://Server3:10000;
DatabaseName=Test;User=admin;Password=adminpass");