Using UCanAccess to read excel sheet instead of JDBC-ODBC Bridge - jdbc

I tried to upgrade my server JVM to java 8 but I was surprised that Oracle has removed JDBC ODBC bridge from Java 8 !
I searched for alternatives and I found people here provide another solution by a library called UCanAccess but it's mainly for accessing Access DB not Excel sheet.
My question is, can I use UCanAccess to access excel sheeting using same JDBC ODBC bridge used on current application ?
Thanks.

UCanAccess is for accessing a Micrsoft Access database through JDBC, so it cannot be used to access an Excelsheet. You could have found this information by looking at the UCanAccess sourceforge page:
UCanAccess is a pure Java JDBC Driver implementation which allows java developers and jdbc client programs to read/write Microsoft Access database (.mdb and .accdb files). No ODBC needed.
As Stackoverflow is not for software recommendations, I suggest you use your favorite search engine to look for an Excel JDBC driver (they exist, but some of them cost money).

Related

Can we use JDBC connector to get data in Power BI

Usually we can get data using ODBC connector in Power BI. Is there any way to get the data using the JDBC connector?
Unfortunately there is no native support for JDBC.
You can upvote the feature request for JDBC at this link
There are options that convert your JDBC connection in to an ODBC one, known as JDBC to ODBC bridges. Oracle has one and here is a Progress option. Once configured you can then use the PowerBI ODBC connector.
Since Power BI is not coded in java its not easy to support JDBC (you will see only ODBC or .net based connectors in PBI). If Microsoft ever wants to add support for JAVA in Power BI then they might have to do via some sort of bridge.
If you are open for 3rd party solution then here is one option by ZappySys
This same problem happens in many non java apps like Excel, MS Access, Informatica PowerCenter they all are not coded in JAVA so cant support loading java libs / runtime.

Tableau driver-resolver definition for JDBC Drivers in a custom connector

I'm trying to figure out how to get Tableau to recognize my JDBC Driver when creating a custom JDBC connector using the Tableau Connector SDK . Currently when Tableau loads my custom connector I can tell the driver is not found because there is a link that shows up in the Connector that says:
"Download and install the drivers, and then connect."
Tableau online does not have the drivers for the SAS data I want to connect to: so I cannot download the drivers to install from Tableau
Luckily I already have the .jar files and have placed them at C:\Program Files\Tableau\Drivers on Windows
In the Connector API Reference "driver-resolver" states that: "This is mainly used for ODBC connections but can be used for JDBC as well" but I do not see specific instructions for working with JDBC drivers explicitly. Except for the Postgres JDBC Example which DOES NOT use a driver-resolver. I also have not seen a JDBC example in the Resolvers github samples
In the Tableau logs I can see that the .jar files containing my driver are recognized by searching for their names, they are shown in the logs.
Logs Environment Section Excerpt:
"environment","v":{...all my jar files listed here}
Drivers not being recognized screenshot that says to download the drivers
Finally, here is what my .tdr file looks like with my current driver-resolver definition that does not work
<tdr class='sas_jdbc'>
<connection-resolver>
<connection-builder>
<script file="connectionBuilder.js" />
</connection-builder>
<connection-properties>
<script file="connectionProperties.js" />
</connection-properties>
</connection-resolver>
<driver-resolver>
<driver-match>
<driver-name type='exact'>com.sas.rio.MVADriver</driver-name>
</driver-match>
</driver-resolver>
</tdr>
Can anyone shed some light on this for me? I feel like I'm close. An example using a JDBC driver-resolver in a .tdr file would be nice.
You don't actually need a .tdr file with JDBC, as all the driver resolution happens in the connectionBuilder.js file today. The URL of the connection there includes the driver name. I added a story to our backlog to make this more clear. I should also mention, that hopefully you are using 2019.4 or higher for the best experience. Thanks for using the SDK!
The answer to this is that driver-resolver is not used in JDBC custom connector definitions. The problem I'm experiencing with getting the SAS JDBC Driver to work is because the SAS JDBC Driver is JDBC Type 2.0. JDBC Drivers need to be Type 4.0 to work with a Tableau custom connector using the Tableau Connector SDK.
The resolution is to use a Type 4.0 JDBC Driver which I have not seen from SAS yet.

How do I connect to Derby from VB6?

I am trying to setup a temporary unit test database that has DB2 style syntax. I know Derby fills this role quite nicely on our Java applications.
I have done much searching, and I have seen that you can use the JDBC DB2 driver to connect to Derby - which is cool, except it doesn't seem as true for the ODBC DB2 (or OLEDB) driver allowing a connection to Derby.
I also saw that Cloudscape had a version but following the download instructions, there is a redirect page that states:
There is no replacement for the old Cloudscape ODBC driver in IBM's world. Does anyone know of another source where I can get it? Or another way of connecting to Derby from VB6 (or of creating an ADODB.Connection in VB.net to Derby).
I suppose I would settle for an old version of Derby that the you can connect with (an old) DB2 ODBC driver.

Is there a google supported JDBC driver for BigQuery?

We are looking to access BigQuery through third party sql clients, ex. RazorSql. I came across StarSchema JDBC driver and I could not make it work with Razorsql and on the webpage it says that the project was archived. So, not sure if its supposed to work. Any suggestions?
The error I get when trying to use it with RazoeSql is:
java.io.IOException: toDerInputStream rejects tag type 123
I am using a service account key file for authentication.
This is JDBC url value I use (where "my-poc" is the project id and "MY_POC" is the dataset name):
jdbc:BQDriver:my-poc%3AMY_POC?withServiceAccount=true
Alas, no there isn't a JDBC driver that is officially supported. There is an ODBC driver developed by Simba in conjunction with google (you can download it here for free), and you can use a JDBC to ODBC bridge (although the official one is deprecated in java 8, I believe you can download one from a couple of different folks (here, for example).
Admittedly, this is not a great solution. IMO Google really should provide a JDBC driver, but they do not.
java.io.IOException: toDerInputStream rejects tag type 123
The JDBC driver requires a p12 formatted file instead of the json formatted file.

What is a importance of Hive ODBC Connector

I like understand the 'Hive ODBC Connector' concept. means What is a use of Hive ODBC Connector in the architecture.
Does it require to set-up the DSN (data source Name ). Can we go for DSN-less configuration ?
Please explain in details
If you have one of the distributions from Cloudera, Hortonworks, MapR, Intel, Microsoft or DataStax, they already come with an ODBC driver in the distribution. The driver is created by Simba Technologies (http://www.simba.com/connectors/apache-hadoop-hive-odbc).
If you're using the Apache version of Hadoop, you can still trial the version of the ODBC driver on the above link for 30 days, however you will need to pay for it to continue use.
I only mention the above as this ODBC driver is a more complete implementation of the ODBC specification than the open source one, and it can also do SQL-HiveQL translation which essentially means that you can plug it into Excel or Tableau or the like and have them issue standard SQL. As mc110 mentioned, you can make DSN or DSN-less connections and there is also a Windows configuration dialog available should you wish to use that.
Also, in the interests of full disclosure, I work for Simba Technologies.
As explained at https://cwiki.apache.org/confluence/display/Hive/HiveODBC, the Hive ODBC connector implements the ODBC API for Hive, potentially allowing a lot of existing well-written ODBC applications to seamlessly use Hive as they would any other database. The link also explains what API calls are and are not supported.
SQLDriverConnect is supported, which implies you can make DSN-less connections. I suggest you read the information from the link for more information. Also, http://www.cloudera.com/content/cloudera-content/cloudera-docs/Connectors/PDF/Cloudera-ODBC-Driver-for-Apache-Hive-Install-Guide.pdf has a section on configuring DSN-less authentication.

Resources