Technical preview
Technical preview function is in a state that it can be tried. The development is complete, there is documentation and there are samples, tutorials and hands-on labs as appropriate.
The community is looking for feedback on the function before declaring it stable. This feedback may result in changes to the external interfaces.
JDBC Resource Connector¶
Connector summary
- Connector Category: Digital Resource Connector
- Source Module: jdbc resource connector .
- Jar File Name:
jdbc-resource-connector.jar
- Supported Asset Type: RelationalDatabase
The JDBC Resource Connector provides a DataSource, which in turn is used to get a connection to underlying database. It provides access to both the schema metadata and the business data content.
Figure 1: JDBC resource connector
Usage¶
The connector is initialized using the connection information attached to the RelationalDatabase asset in the open metadata ecosystem.
Figure 2: Connection information used to create an instance of the JDBC resource connector
The optional configuration properties supported by this connector are:
jdbcDriverManagerClassName
- requests the named class to be loaded and registered as a driver. This property only needs to be defined if the connector is experiencing exceptions related to a missing DriverManager class for the database URL.jdbcConnectionTimeout
- sets the maximum time in seconds that this data source will wait while attempting to connect to a database. The default value is 0 which means use the system default timeout, if any; otherwise it means no timeout.jdbcDatabaseName
- provides a name to use in messages about the database. If it is not set then the connection URL string is used.
Below is an example connection for a PostgreSQL database:
{
"class": "Connection",
"connectorType": {
"class": "ConnectorType",
"connectorProviderClassName": "org.odpi.openmetadata.adapters.connectors.resource.jdbc.JDBCResourceConnectorProvider"
},
"endpoint": {
"class": "Endpoint",
"address": "jdbc:postgresql://localhost:5432/myDatabase"
},
"userId": "xxxxx",
"clearPassword": "xxxx",
"configurationProperties": {
"jdbcDriverManagerClassName": "org.postgresql.Driver",
"jdbcConnectionTimeout": "10",
"jdbcDatabaseName": "MyDatabase"
}
}
Raise an issue or comment below