JDBC Connection between Tableau and Apache Druid - jdbc

I have been trying to connect to Druid from Tableau using a JDBC Driver.
I have successfully connected using an ODBC Driver as per my answer to this post Connecting Tableau to Apache Druid
However, I want to be able to use a JDBC driver as well.
Though I have followed the steps in this post: https://support.imply.io/hc/en-us/articles/360025589574-Connecting-Tableau-to-Druid-with-JDBC,
I keep getting the error: "No suitable Driver installed or the URL is incorrect".
As per the article, I have ensured that the avatica driver is downloaded and installed in ~/Library/Tableau/Drivers, as I am on a mac.
I am also sure I am giving the right URL to my broker which I am otherwise able to access on a browser at port 8082.
Any pointers what might be wrong?

the issue may be that you don't have the avatica driver in your classpath. please see https://calcite.apache.org/docs/adapter.html

I found from this article: https://kb.tableau.com/articles/issue/locating-library-jdbc-directory-in-mac-to-install-the-athena-drivers-for-tableau-prep
that Tableau actually looks for the JDBC driver in the ~/Library/JDBC folder on mac (and it does not seem to read from ~/Library/Tableau/Drivers folder as mentioned in the original article in my question). Once I placed the avatica driver in this folder, Tableau desktop was able to find the driver.

Related

tableau how to connect duckdb

I download the duckdb jdbc driver and copy it to the install directory: C:\Program Files\Tableau\Drivers\duckdb_jdbc-0.2.9.jar
then I start the tableau , and choose the others jdbc drivers to connect,
set the configuration like this
try to connect to duckdb
the fail screen
any other configuration left? I already checkout the offical documents and found nothing related to this.
by the way, I can connect successfully using the Jetbrains Datagrip IDE after set the proper className and the same connection url?
the duckdb database behave like sqlite but for analytical workload. https://github.com/duckdb/duckdb

Cannot connect to Oracle database via TCPS

We have an Oracle server set up and are using TCP with SSL as connection. This setup was made with the assistant wizard and we used the default settings pretty much everywhere (which also means that no tnsnames.ora or listener.ora exist). lsnrctl status shows that the correct ports are listening.
We are trying to connect to this database via DBeaver and SQuirrel SQL but cannot get it to work. We have set the vmargs for the programs to contain the certificate of the server (e.g. dbeaver.exe -vmargs -Djavax.net.ssl.trustStore=C:/...keystore.jks -Djavax.net.ssl.trustStorePassword=password -Djavax.net.ssl.trustStoreType=JKS), which works fine.
Connecting to the database with a concrete JDBC URL string (jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS=(PROTOCOL=TCPS)(HOST=IP)(PORT=5500))(CONNECT_DATA=(SERVICE_NAME=testdb)))) does not work and times out after 60 seconds without a proper error (IO Error: Got minus one from a read call). We have tried pretty much everything and cannot get it to work.
The ports are correctly assigned, the database can successfully get accessed with the normal TCP protocol and port 1521.jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=IP)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=testdb)))
Are we missing steps? There don't seem to be any firewall issues. The certificates seem to be working fine as well, but we cannot connect with any of the programs (or sqlplus via command line).
Anyone know what could be the problem? Thanks!
Can you check out the SSL blog or our OTN page for step-by-step instructions? If you are using TLSv1.2 then the JDK version and JDBC driver versions are very important.
In the end I got it to work. There are various sites online that show you how it's done. I used this one:
https://database.edorex.ch/blog/database-connection-with-a-certificate/
Getting the wallets set up, certificates set up and the user set up in the database were the most important steps. Additionally, I had to separate the server and client machines. The server is now on a VM and it works that way, I couldn't get it to work having both on the same machine.

Connect to kerberised hive using jdbc from remote windows system

I have setup a hive environment with Kerberos security enabled on a Linux server (Red Hat). And I need to connect from a remote windows machine to hive using JDBC.
So, I have hiveserver2 running in the linux machine, and I have done "kinit".
Now I try to connect from a java program on the windows side with a test program like this,
Class.forName("org.apache.hive.jdbc.HiveDriver");
String url = "jdbc:hive2://<host>:10000/default;principal=hive/_HOST#<YOUR-REALM.COM>"
Connection con = DriverManager.getConnection(url);
And I got the following error,
Exception due to: Could not open client transport with JDBC Uri:
jdbc:hive2://<host>:10000/;principal=hive/_HOST#YOUR-REALM.COM>:
GSS initiate failed
What am I doing here wrong ? I checked many forums, but couldn't get a proper solution. Any answer will be appreciated.
Thanks
If you were running your code in Linux, I would simply point to that post -- i.e. you must use System properties to define Kerberos and JAAS configuration, from conf files with specific formats.
And you have to switch the debug trace flags to understand subtile configuration issue (i.e. different flavors/versions of JVMs may have different syntax requirements, which are not documented, it's a trial-and-error process).
But on Windows there are additional problems:
the Apache Hive JDBC driver has some dependencies on Hadoop JARs, especially when Kerberos is involved (see that post for details)
these Hadoop JARs require "native libraries" -- i.e. a Windows port of Hadoop (which you have to compile yourself!! or download from an insecure source on the web!!) -- plus System properties hadoop.home.dir and java.library.path pointing to the Hadoop home dir and its bin sub-dir respectively
On the top of that, the Apache Hive driver has compatibility issues -- whenever there are changes in the wire protocol, newer clients cannot connect to older servers.
So I strongly advise you to use the Cloudera JDBC driver for Hive for your Windows clients. The Cloudera site just asks your e-mail.
After that you have a 80+ pages PDF manual to read, the JARs to add to your CLASSPATH, and your JDBC URL to adapt according to the manual.
Side note: the Cloudera driver is a proper JDBC-4.x compliant driver, no need for that legacy Class.forName()...
The key for us when we ran into the problem, was as follows:
On your server there are certain kerberos principals listed that are allowed to operate on the data.
When we tried to run a query via JDBC, we didn't do the proper kinit on the client side.
In this case the solution is obvious:
On the windows client: do a kinit with the proper account before connecting
String url = "jdbc:hive2://<host>:10000/default;principal=hive/_HOST#<YOUR-REALM.COM>"
You should replace <YOUR-REALM.COM> with your real REALM.

How to connect Neo4j JDBC driver with DbVisualizer

I am running Neo4j 2.1.6, tried Neo4j 2.20 as well.
I can not connect it with DbVisualizer 9.1.13
And I can not find ANY step by step clear explanation on how to do it.
First I've got binary JDBC Neo4j-2.0.1-SNAPSHOT here
I can run my just installed Neo4j instance from the browser localhost:7474
and I don't know what the REST API is all about and if it is turned on by default.
I can run the Neo4j 2.20 same way that comes with a new feature of user authorization and I am not sure if that JDBC driver is compatible with it. My user:pass is neo4j:neo
So in DbVisualizer I clicked Tools->Driver Manager and filled out like this:
My connection properties are as follows:
I've got the error on connect:
Product: DbVisualizer Pro 9.1.13
Build: #2310 (2015-01-11 11:26:27)
Java Version: 1.8.0_25
OS Name: Windows Server 2012 R2
An error occurred while establishing the connection:
The selected Driver cannot handle the specified Database URL.
The most common reason for this error is that the database URL
contains a syntax error preventing the driver from accepting it.
The error also occurs when trying to connect to a database
with the wrong driver.
If you look at the documentation for the jdbc driver, you see that the database URL is:
jdbc:neo4j://localhost:7474/
Please try to make it work with 2.1.6 first.
For the 2.2. auth you have to use the token you got back as password.

Configuring TNS Datasources in ColdFusion 8

I'm researching how to set up a Coldfusion 8 (CF) data source that uses Oracle TNS under CentOS. I checked out this Stackoverflow article. But, I'm still having some difficulty. I got a copy of our tnsnames.ora file and put it on the server at /coldfusion/install/folder/TNSNamesFolder/TNSNames.ora. I downloaded the latest Oracle JDBC drivers for 11g, put them in a folder in the class path and restarted CF. I verified that the new JAR files were picked up by viewing the settings summary. The JDBC URL I'm using is:
jdbc:oracle:thin:TNSNamesFile=/coldfusion/install/folder/TNSNamesFolder/TNSNames.ora/TNSNames.ora; TNSServerName=%TNSEntry%
But, I'm getting the following error: The Network Adapter could not establish the connection. Another issue that occurred to me is that if there's another JDBC driver for Oracle in the class path, how do I know what JAR it's in? How do I make sure that these new JDBC drivers are the only ones in use for Oracle?
JDBC URL : jdbc:macromedia:oracle:TNSNamesFile=C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\tnsnames.ora;TNSServerName=db9d1.db
Driver Class : oracle.jdbc.OracleDriver

Resources