Passing the connection URL
- Last Updated: March 5, 2024
- 1 minute read
- DataDirect Connectors
- JDBC
- Documentation
After setting the CLASSPATH, the required connection information needs to be passed in the form of a connection URL. The following example includes the properties required for connecting with UserID/Password authentication.
Connection URL Syntax
The connection URL takes the following form:
jdbc:datadirect:impala://myserver:21050;DatabaseName=database_name;
UserName=user_name;Password=password;[property=value[;...]];
where:
- server_name
- specifies the base URL of the Impala instance to which you want to issue requests. For example, //myserver:21050.
- port_number
- specifies the port number of the server listener. The
default is
21050.
- database_name
- specifies the name of the database to which you are connecting.
- user_name
- Specifies the user ID of LDAP used to authenticate to Impala with UserID/Password authentication method.
- password
- Specifies the password of LDAP used to authenticate to Impala with UserID/Password authentication method.
- property=value
- specifies connection property settings. Multiple properties are separated by a semi-colon.
The following example connection string includes the properties required for connecting with the UserID/Password authentication.
Connection conn = DriverManager.getConnection
("jdbc:datadirect:impala://myserver:21050;DatabaseName=ImpalaDB;
UserName=JohnSmith@example.com;Password=abc123");