You can translate the question and the replies:

specifying the adapter for a jdbc datasource from VQL (as opposed to: from the admin tool)

When creating a jdbc datasource via VQL with a driver from lib/extensions/jdbc-drivers-external/... it seems that always the generic adapter is selected. However I want to control the adapter. Is that possible via VQL or in any other way programmatically? Thank you
user
27-09-2022 06:26:32 -0400
code

3 Answers

Hello, I understand that you want to create a JDBC datasource in Denodo using VQL and want to be able to specify the database adapter instead of the Generic one. The *“CREATE DATASOURCE JDBC”* statement is used to create the JDBC datasource using VQL. In this VQL statement, the parameter “**Classpath**” is used to specify the database adapter in the VQL query to create a database. It’s the optional parameter that provides the path to the JAR file containing the JDBC driver for the specified source. You can refer to the document [JDBC Datasources](https://community.denodo.com/docs/html/browse/8.0/en/vdp/vql/generating_wrappers_and_data_sources/creating_data_sources/jdbc_data_sources), to get more information on creating JDBC data sources using VQL in Denodo. Hope this helps!
Denodo Team
27-09-2022 19:31:30 -0400
code
Hello and thank you for your response. However the question how to specify the **jdbc adapter** rather than the jdbc driver. When we specify in VQL for example ``` CLASSPATH = 'spark-1.6' ``` I see in the Admin UI the correct adapter however in many cases it is just the generic adapter, in particular if the jdbc driver comes a subfolder in `.../lib/extensions/jdbc-drivers-external` Is there a way to control the adapter (programmatically) to avoid the generic driver if wanted?
user
28-09-2022 05:47:59 -0400
Hello, I understand that you want to avoid the value** “Generic”** for the field Database Adapter in the** Datasource > Configuration**. To connect to a database that is not listed in the [Supported JDBC Data Sources](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/appendix/supported_jdbc_data_sources/supported_jdbc_data_sources#supported-jdbc-data-sources), Denodo uses the adapter **“Generic”**. For example, if I create a data source using VQL and provide following values in “Create Datasource” statement : 1. ``` DATABASENAME = 'oracle' DATABASEVERSION = '11g’ ``` *In the “Admin UI”, it will show the Database Adapter as “Oracle-11g”.* 1. ``` DATABASENAME = 'oracle' DATABASEVERSION = '12g' ``` *In the “Admin UI”, it will show the Database Adapter as “Generic”.* 1. ``` DATABASENAME = ' ' DATABASEVERSION = ' ' ``` *In the “Admin UI”, it will show the Database Adapter as “Generic”.* Hence, you can observe that the values displayed in the Admin UI for **Datasources > Configuration > Database Adapter** corresponding to the values provided in the *“DATABASE NAME”* & *“DATABASE VERSION”* of VQL statement can be controlled only if you are connecting to the database that’s already available in Denodo. Otherwise, the value of the Database Adapter field will be **“Generic”**, which can’t be modified by VQL or programmatically from the user side. Hope this helps!
Denodo Team
28-09-2022 20:20:07 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here