Class GenericJdbcConnectionFactory
- java.lang.Object
-
- com.amazonaws.athena.connectors.jdbc.connection.GenericJdbcConnectionFactory
-
- All Implemented Interfaces:
JdbcConnectionFactory
- Direct Known Subclasses:
DataLakeGen2JdbcConnectionFactory
,HiveJdbcConnectionFactory
,HiveJdbcConnectionFactory
,ImpalaJdbcConnectionFactory
,OracleJdbcConnectionFactory
,SqlServerJdbcConnectionFactory
,SynapseJdbcConnectionFactory
public class GenericJdbcConnectionFactory extends Object implements JdbcConnectionFactory
Provides a generic jdbc connection factory that can be used to connect to standard databases. Configures following defaults if not present:- Default ports will be used for the engine if not present.
-
-
Field Summary
Fields Modifier and Type Field Description static Pattern
SECRET_NAME_PATTERN
-
Constructor Summary
Constructors Constructor Description GenericJdbcConnectionFactory(DatabaseConnectionConfig databaseConnectionConfig, Map<String,String> properties, DatabaseConnectionInfo databaseConnectionInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Connection
getConnection(JdbcCredentialProvider jdbcCredentialProvider)
Retrieves database connection for a database type.
-
-
-
Field Detail
-
SECRET_NAME_PATTERN
public static final Pattern SECRET_NAME_PATTERN
-
-
Constructor Detail
-
GenericJdbcConnectionFactory
public GenericJdbcConnectionFactory(DatabaseConnectionConfig databaseConnectionConfig, Map<String,String> properties, DatabaseConnectionInfo databaseConnectionInfo)
- Parameters:
databaseConnectionConfig
- database connection configurationDatabaseConnectionConfig
properties
- JDBC connection properties.
-
-
Method Detail
-
getConnection
public Connection getConnection(JdbcCredentialProvider jdbcCredentialProvider) throws Exception
Description copied from interface:JdbcConnectionFactory
Retrieves database connection for a database type.- Specified by:
getConnection
in interfaceJdbcConnectionFactory
- Parameters:
jdbcCredentialProvider
- jdbc user and password provider.- Returns:
- JDBC connection. See
Connection
. - Throws:
Exception
-
-