[]
        
(Showing Draft Content)

Connect to a JDBC Data Provider

Connect to a Custom JDBC Data Provider

To create a Wyn Data Source using a JDBC connector, go to the Create Data Source page in the Resource Portal. If the Wyn administrators have deployed a JDBC custom data source, you will find it under the custom section.


NewCustomDataSource


Click the custom data source icon to make a Wyn Data Source. In the screenshot below, we have three custom connectors, one of which is a JDBC connector.


JDBCNewCustomDataSource


The developer should have provided a guide on how to build a connection string to the data provider that is linked to from the dialog.

Connection string pattern

The connection string is a combination of three parts that have the following pattern:


DriverClass=???;DriverClass=???;JdbcUrl=???


The details of your specific custom connector will be provided by the developer in the guide:

  • DriverPath: The relative path to the JDBC driver jar file. The path is relative to the location of the primary library of the data provider. In a Docker environment, you can mount the jar file to the container and specify the path here.

  • DriverClass: The class name of the JDBC driver. This is required to load the driver.

  • JdbcUrl: The JDBC connection string. This is the URL that the driver will use to connect to the database.

Like any other built-in data providers, you can use @{user_context_name} and/or #{organization_context_name} in the connection string to refer to context variables.


Another Sample JDBC connection string to MySQL:

DriverPath = "mysql-connector-j-8.2.0.jar";
DriverClass = "com.mysql.cj.jdbc.Driver";
JdbcUrl = "jdbc:mysql://10.32.5.241:3306/stg_GEF11977?user=root&password=unknown";

Command text pattern

The command text obeys the SQL syntax of the database you are connecting to.