You can translate the question and the replies:

Custom Policy: Query another view

Hello, I'm trying to query another view inside custom policy I've tried loading the driver class using: > Class.forName("com.denodo.vdp.jdbc.Driver"); I also added the denodo-vdp-jdbcdriver.jar when compiling my custom policy. The error that occurs right now is: "Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary." Could you give a sample on how you query another view inside the custom policy that was created?
user
16-08-2021 00:41:35 -0400

3 Answers

Hi, The first thing I would like to mention is that the message: “Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver’. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.” is a warning not an error. Please check out the [Changes in the Connector/J API](https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-api-changes.html) section from the MySQL documentation. This section states that this warning comes from the name of the class that implements "java.sql.Driver" in MySQL Connector/J having changed from com.mysql.jdbc.Driver to com.mysql.cj.jdbc.Driver. The warning comes from there being a reference to an old MySQL JDBC driver that is no longer supported. If you have a valid support user account, please open a new support case at support.denodo.com so that the support team can review this issue in detail. Hope this helps!
Denodo Team
16-08-2021 14:15:22 -0400
Hello, Thanks for the update. Additional question, is there a way for a custom policy to query another view without connecting again using a jdbc connection? Thanks!
user
16-08-2021 22:01:42 -0400
Hi, If I query a view that gets its data from a JDBC data source and I am not using the cache, every time that view is queried I will have to use a JDBC connection. This will be the same whether it is from a custom policy or not. The only way for the view to be queried is by pulling data from the datasource. Hope this helps!
Denodo Team
25-08-2021 17:56:16 -0400
You must sign in to add an answer. If you do not have an account, you can register here